diff --git a/.gitattributes b/.gitattributes
index b2dea06fd7cfa4126571562bd3726a824d877fa7..32f68e85b57a43240838698eb1c4f59b977018d2 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,6 +3,8 @@
 
 /apps/accessibility/js/accessibility.js binary
 /apps/accessibility/js/accessibility.js.map binary
+/apps/files_versions/js/files_versions.js binary
+/apps/files_versions/js/files_versions.js.map binary
 /apps/oauth2/js/oauth2.js binary
 /apps/oauth2/js/oauth2.js.map binary
 /apps/twofactor_backupcodes/js/*.js binary
diff --git a/apps/files_versions/.l10nignore b/apps/files_versions/.l10nignore
index 8b832897e3f99a8bc4df8ada259f4b110a75a90b..a5844cfefe9ee7ff054bfd9811a39aa6446a771b 100644
--- a/apps/files_versions/.l10nignore
+++ b/apps/files_versions/.l10nignore
@@ -1,2 +1,3 @@
 # compiled vue templates
-js/templates.js
+js/files_versions.js
+src/templates.js
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php
index 1ac7d40689ed3c13d882d9f1747f981feb45d962..f28210553c2170cded7e1c2d7ea7597c39b989bd 100644
--- a/apps/files_versions/appinfo/app.php
+++ b/apps/files_versions/appinfo/app.php
@@ -22,6 +22,4 @@
  *
  */
 
-\OCP\Util::addStyle('files_versions', 'versions');
-
 \OCA\Files_Versions\Hooks::connectHooks();
diff --git a/apps/files_versions/js/files_versions.js b/apps/files_versions/js/files_versions.js
new file mode 100644
index 0000000000000000000000000000000000000000..4405671a1019d93cedbb031273f26608abf13dfe
Binary files /dev/null and b/apps/files_versions/js/files_versions.js differ
diff --git a/apps/files_versions/js/files_versions.js.map b/apps/files_versions/js/files_versions.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ea95c34bf27c8ff34ab4db1cc0b1750e19a5a2bd
Binary files /dev/null and b/apps/files_versions/js/files_versions.js.map differ
diff --git a/apps/files_versions/js/merged.json b/apps/files_versions/js/merged.json
deleted file mode 100644
index 67ee60b38516e1bc6010bfc6cda87e92656bddfb..0000000000000000000000000000000000000000
--- a/apps/files_versions/js/merged.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-  "versionmodel.js",
-  "templates.js",
-  "versioncollection.js",
-  "versionstabview.js",
-  "filesplugin.js"
-]
diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Hooks.php
index 3c4049e2139bfd4712f9a2b85fb618a40409f651..4e2dcfa30876390eb2fc2d14f50b03a477879a2a 100644
--- a/apps/files_versions/lib/Hooks.php
+++ b/apps/files_versions/lib/Hooks.php
@@ -149,6 +149,6 @@ class Hooks {
 	 * Load additional scripts when the files app is visible
 	 */
 	public static function onLoadFilesAppScripts() {
-		\OCP\Util::addScript('files_versions', 'merged');
+		\OCP\Util::addScript('files_versions', 'files_versions');
 	}
 }
diff --git a/apps/files_versions/css/versions.css b/apps/files_versions/src/css/versions.css
similarity index 100%
rename from apps/files_versions/css/versions.css
rename to apps/files_versions/src/css/versions.css
diff --git a/apps/files_versions/src/files_versions.js b/apps/files_versions/src/files_versions.js
new file mode 100644
index 0000000000000000000000000000000000000000..e9504e03ed77a335580f6abfd3e8a5cda0f6d49e
--- /dev/null
+++ b/apps/files_versions/src/files_versions.js
@@ -0,0 +1,8 @@
+import './versionmodel'
+import './templates'
+import './versioncollection'
+import './versionstabview'
+import './filesplugin'
+import './css/versions.css'
+
+window.OCA.Versions = OCA.Versions
diff --git a/apps/files_versions/js/filesplugin.js b/apps/files_versions/src/filesplugin.js
similarity index 100%
rename from apps/files_versions/js/filesplugin.js
rename to apps/files_versions/src/filesplugin.js
diff --git a/apps/files_versions/js/templates.js b/apps/files_versions/src/templates.js
similarity index 100%
rename from apps/files_versions/js/templates.js
rename to apps/files_versions/src/templates.js
diff --git a/apps/files_versions/js/templates/item.handlebars b/apps/files_versions/src/templates/item.handlebars
similarity index 100%
rename from apps/files_versions/js/templates/item.handlebars
rename to apps/files_versions/src/templates/item.handlebars
diff --git a/apps/files_versions/js/templates/template.handlebars b/apps/files_versions/src/templates/template.handlebars
similarity index 100%
rename from apps/files_versions/js/templates/template.handlebars
rename to apps/files_versions/src/templates/template.handlebars
diff --git a/apps/files_versions/js/versioncollection.js b/apps/files_versions/src/versioncollection.js
similarity index 100%
rename from apps/files_versions/js/versioncollection.js
rename to apps/files_versions/src/versioncollection.js
diff --git a/apps/files_versions/js/versionmodel.js b/apps/files_versions/src/versionmodel.js
similarity index 100%
rename from apps/files_versions/js/versionmodel.js
rename to apps/files_versions/src/versionmodel.js
diff --git a/apps/files_versions/js/versionstabview.js b/apps/files_versions/src/versionstabview.js
similarity index 100%
rename from apps/files_versions/js/versionstabview.js
rename to apps/files_versions/src/versionstabview.js
diff --git a/apps/files_versions/webpack.js b/apps/files_versions/webpack.js
new file mode 100644
index 0000000000000000000000000000000000000000..4b0f1e4f6bf402cf49ed21de9ce52c7f8b1d1b3d
--- /dev/null
+++ b/apps/files_versions/webpack.js
@@ -0,0 +1,37 @@
+const path = require('path');
+
+module.exports = {
+	entry: path.join(__dirname, 'src', 'files_versions.js'),
+	output: {
+		path: path.resolve(__dirname, 'js'),
+		publicPath: '/js/',
+		filename: 'files_versions.js'
+	},
+	module: {
+		rules: [
+			{
+				test: /\.css$/,
+				use: ['style-loader', 'css-loader']
+			},
+			{
+				test: /\.scss$/,
+				use: ['style-loader', 'css-loader', 'sass-loader']
+			},
+			{
+				test: /\.js$/,
+				loader: 'babel-loader',
+				exclude: /node_modules/
+			},
+			{
+				test: /\.(png|jpg|gif|svg)$/,
+				loader: 'file-loader',
+				options: {
+					name: '[name].[ext]?[hash]'
+				}
+			}
+		]
+	},
+	resolve: {
+		extensions: ['*', '.js']
+	}
+};
diff --git a/core/js/core.json b/core/js/core.json
index 77aeffff10d54ccfc1c542c3568df75d26594cca..5bf6512d6a212cd34bef5ff203f59bf6349f1264 100644
--- a/core/js/core.json
+++ b/core/js/core.json
@@ -13,9 +13,7 @@
 		"sharedialoglinkshareview.js",
 		"sharedialogresharerinfoview.js",
 		"sharedialogshareelistview.js",
-		"contactsmenu_templates.js",
 		"public/publicpage.js",
-		"multiselect.js",
 		"oc-requesttoken.js",
 		"setupchecks.js",
 		"../search/js/search.js",
diff --git a/tests/karma.config.js b/tests/karma.config.js
index fe60de3bdbb3e7a6585685210e11e34dac7ff3e8..7ffd5ad4e62c61925570708dc2cf5f15f57ebb29 100644
--- a/tests/karma.config.js
+++ b/tests/karma.config.js
@@ -45,6 +45,7 @@ module.exports = function(config) {
 		return [
 			'files',
 			'files_trashbin',
+			'files_versions',
 			{
 				name: 'files_sharing',
 				srcFiles: [
@@ -74,17 +75,6 @@ module.exports = function(config) {
 				],
 				testFiles: ['apps/files_external/tests/js/*.js']
 			},
-			{
-				name: 'files_versions',
-				srcFiles: [
-					// need to enforce loading order...
-					'apps/files_versions/js/versionmodel.js',
-					'apps/files_versions/js/templates.js',
-					'apps/files_versions/js/versioncollection.js',
-					'apps/files_versions/js/versionstabview.js'
-				],
-				testFiles: ['apps/files_versions/tests/js/**/*.js']
-			},
 			{
 				name: 'comments',
 				srcFiles: [
@@ -117,8 +107,7 @@ module.exports = function(config) {
 			{
 				name: 'settings',
 				srcFiles: [
-					'settings/js/apps.js',
-					'core/vendor/marked/marked.min.js'
+					'settings/js/apps.js'
 				]
 			}
 		];
diff --git a/webpack.common.js b/webpack.common.js
index 9a117ba4b3c67be9434ef085f52a4134c07d9af4..f6a0d0213ae99dd33776abc6f3367808e6dc4c46 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -1,5 +1,10 @@
 const core = require('./core/webpack');
 const files_trashbin = require('./apps/files_trashbin/webpack')
+const files_versions = require('./apps/files_versions/webpack');
 const oauth2 = require('./apps/oauth2/webpack')
 
-module.exports = [].concat(core, files_trashbin, oauth2);
+module.exports = [].concat(
+	core,
+	files_trashbin,
+	files_versions,
+	oauth2);