aboutsummaryrefslogtreecommitdiff
path: root/juick-www/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/webpack.config.js')
-rw-r--r--juick-www/webpack.config.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/juick-www/webpack.config.js b/juick-www/webpack.config.js
index 383c62a5..f4e41ecf 100644
--- a/juick-www/webpack.config.js
+++ b/juick-www/webpack.config.js
@@ -1,19 +1,23 @@
var webpack = require("webpack")
-var globby = require("globby")
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var StyleLintPlugin = require('stylelint-webpack-plugin')
+var AssetPipelinePlugin = require('webpack-asset-pipeline')
+
module.exports = {
devtool: 'source-map',
entry: {
- "scripts" : globby.sync([
- __dirname + "/src/main/static/*.*",
- require.resolve('evil-icons/assets/evil-icons.css'),
+ "scripts" : [
+ __dirname + "/src/main/static/scripts.js",
require.resolve('evil-icons/assets/evil-icons.js')
- ])
+ ],
+ "style" : [
+ __dirname + "/src/main/static/style.css",
+ require.resolve('evil-icons/assets/evil-icons.css')
+ ]
},
output: {
- path: __dirname + "/src/main/webapp",
- filename: "[name].js"
+ path: __dirname + "/src/main/resources",
+ filename: "[name].[chunkhash].js"
},
module: {
loaders: [
@@ -25,8 +29,10 @@ module.exports = {
]
},
plugins: [
+ new webpack.optimize.ModuleConcatenationPlugin(),
new StyleLintPlugin({ configFile: '.stylelintrc.json', context: 'src/main/static', files: ['**/*.css'], emitErrors: false }),
- new ExtractTextPlugin({ filename: "style.css", allChunks: true })
+ new ExtractTextPlugin({ filename: "style.[chunkhash].css", allChunks: true }),
+ new AssetPipelinePlugin()
],
} \ No newline at end of file