Cleanup when build finishes
This commit is contained in:
parent
f201b2f1c8
commit
c8901610bd
|
@ -6,8 +6,7 @@
|
||||||
"author": "https://github.com/engelsystem/engelsystem/contributors",
|
"author": "https://github.com/engelsystem/engelsystem/contributors",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "(export NODE_ENV=production && yarn build:clean && yarn build:webpack)",
|
"build": "NODE_ENV=production yarn build:webpack",
|
||||||
"build:clean": "rimraf public/assets",
|
|
||||||
"build:webpack": "webpack",
|
"build:webpack": "webpack",
|
||||||
"build:watch": "webpack --watch"
|
"build:watch": "webpack --watch"
|
||||||
},
|
},
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
"mini-css-extract-plugin": "^1.6.0",
|
"mini-css-extract-plugin": "^1.6.0",
|
||||||
"postcss": "^8.2.8",
|
"postcss": "^8.2.8",
|
||||||
"postcss-loader": "^5.2.0",
|
"postcss-loader": "^5.2.0",
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"sass-loader": "^12.0.0",
|
"sass-loader": "^12.0.0",
|
||||||
"style-loader": "^2.0.0",
|
"style-loader": "^2.0.0",
|
||||||
|
|
|
@ -47,6 +47,7 @@ module.exports = {
|
||||||
path: path.resolve('public/assets'),
|
path: path.resolve('public/assets'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
publicPath: '',
|
publicPath: '',
|
||||||
|
clean: true,
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: __DEV__ ? [] : [new CssMinimizerPlugin(), new TerserPlugin()],
|
minimizer: __DEV__ ? [] : [new CssMinimizerPlugin(), new TerserPlugin()],
|
||||||
|
|
Loading…
Reference in New Issue