diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-07 10:21:34 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-07 10:21:34 +0300 |
commit | 01f83066ac7668f73be506afc869c717bfff7393 (patch) | |
tree | d0c425aa5c5c1919b05848e5b68cf02e3c6b0635 | |
parent | 588f5cf32fc3ed7ca7e8f4c52b5572f60f2a86a2 (diff) |
Fix js build
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | js/webpack.base.config.js | 21 | ||||
-rw-r--r-- | package.json | 5 |
2 files changed, 23 insertions, 3 deletions
diff --git a/js/webpack.base.config.js b/js/webpack.base.config.js index 13bd91f..7e9cd80 100644 --- a/js/webpack.base.config.js +++ b/js/webpack.base.config.js @@ -1,4 +1,5 @@ const path = require('path'); +const {VueLoaderPlugin} = require('vue-loader') module.exports = { entry: './js/init.js', @@ -20,7 +21,25 @@ module.exports = { options: { loaders: {} } + }, + { + test: /\.css$/, + use: [ + { + loader: 'vue-style-loader' + }, + { + loader: 'css-loader', + options: { + modules: true, + localIdentName: '[local]_[hash:base64:8]' + } + } + ] } ] - } + }, + plugins: [ + new VueLoaderPlugin() + ] }; diff --git a/package.json b/package.json index c4856ea..d4fd988 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "test": "tests" }, "scripts": { - "build": "./node_modules/webpack-cli/bin/webpack.js --config js/webpack.prod.config.js", - "dev": "./node_modules/webpack-cli/bin/webpack.js --config js/webpack.dev.config.js --watch", + "build": "./node_modules/webpack-cli/bin/cli.js --config js/webpack.prod.config.js", + "dev": "./node_modules/webpack-cli/bin/cli.js --config js/webpack.dev.config.js --watch", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -24,6 +24,7 @@ "nextcloud_fetch": "^2.1.0", "vue": "^2.5.17", "vue-loader": "^15.2.7", + "vue-style-loader": "^4.1.1", "vue-template-compiler": "^2.5.17" }, "devDependencies": { |