diff options
author | Vitaly Takmazov | 2017-06-22 15:37:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-22 16:12:02 +0300 |
commit | aa19744ae40767b2523ac0117792b47e08209cdf (patch) | |
tree | 83da69f6998f6cceac8d359f1b0ff566d4148c21 /juick-www/webpack.config.js | |
parent | 7928ef38bbca41fdbcff17e78798b91723e2554e (diff) |
Webpack 3, chunknames in templates
Diffstat (limited to 'juick-www/webpack.config.js')
-rw-r--r-- | juick-www/webpack.config.js | 22 |
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 |