aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Killy2017-11-06 18:05:20 +0300
committerGravatar Vitaly Takmazov2017-11-10 06:32:37 +0000
commit4f32ea8c6889be56861a290e633a89c5b6740e3a (patch)
tree21ed5a15d3873725bcda8623a6aa6fe63142c9c2
parenta555772beea974cc0f012f14ee726c5682ab0a83 (diff)
www: clean webpack output
hashed files keep piling up in resources folder atm
-rw-r--r--juick-www/package.json1
-rw-r--r--juick-www/webpack.config.js2
2 files changed, 3 insertions, 0 deletions
diff --git a/juick-www/package.json b/juick-www/package.json
index 1639023a..a5a63b55 100644
--- a/juick-www/package.json
+++ b/juick-www/package.json
@@ -15,6 +15,7 @@
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
+ "clean-webpack-plugin":"^0.1.17",
"css-loader": "^0.28.7",
"eslint": "^4.9.0",
"eslint-loader": "^1.9.0",
diff --git a/juick-www/webpack.config.js b/juick-www/webpack.config.js
index 54c9114d..1885efee 100644
--- a/juick-www/webpack.config.js
+++ b/juick-www/webpack.config.js
@@ -2,6 +2,7 @@ var webpack = require("webpack")
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var StyleLintPlugin = require('stylelint-webpack-plugin')
var AssetPipelinePlugin = require('webpack-asset-pipeline')
+var CleanWebpackPlugin = require('clean-webpack-plugin')
module.exports = {
devtool: 'source-map',
@@ -30,6 +31,7 @@ module.exports = {
]
},
plugins: [
+ new CleanWebpackPlugin([ '*.css', '*.js', '*.map' ], { root: __dirname + '/src/main/resources' }),
new webpack.optimize.ModuleConcatenationPlugin(),
new StyleLintPlugin({ configFile: '.stylelintrc.json', context: 'src/main/static', files: ['**/*.css'], emitErrors: false }),
new ExtractTextPlugin({ filename: "style.[hash].css", allChunks: true }),