diff --git a/glances/outputs/static/package-lock.json b/glances/outputs/static/package-lock.json index 29ad82b4..42149008 100644 --- a/glances/outputs/static/package-lock.json +++ b/glances/outputs/static/package-lock.json @@ -819,6 +819,15 @@ "source-map": "0.5.7" } }, + "clean-webpack-plugin": { + "version": "0.1.18", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-0.1.18.tgz", + "integrity": "sha512-Kf1BxQnNy2Zq5TBIgWBTEHrhycOM1QjjBYOoTV5P7WioAPr/sh6fgPwn6xYvTIp3EP+yUqoOL4YFpLQVobeIUg==", + "dev": true, + "requires": { + "rimraf": "2.6.2" + } + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", diff --git a/glances/outputs/static/package.json b/glances/outputs/static/package.json index 99dbac42..7144f2e6 100644 --- a/glances/outputs/static/package.json +++ b/glances/outputs/static/package.json @@ -9,6 +9,7 @@ }, "devDependencies": { "bower": "^1.8.0", + "clean-webpack-plugin": "^0.1.18", "copy-webpack-plugin": "^4.4.1", "css-loader": "^0.28.9", "del": "^2.2.1", diff --git a/glances/outputs/static/webpack.config.js b/glances/outputs/static/webpack.config.js index 391ae1e2..b14f34ed 100644 --- a/glances/outputs/static/webpack.config.js +++ b/glances/outputs/static/webpack.config.js @@ -2,6 +2,8 @@ const webpack = require("webpack"); const path = require("path"); +const CleanWebpackPlugin = require("clean-webpack-plugin"); + module.exports = { entry: "./js/app.js", output: { @@ -53,4 +55,7 @@ module.exports = { }, ], }, + plugins: [ + new CleanWebpackPlugin("./public/*.*"), + ] }; \ No newline at end of file diff --git a/glances/outputs/static/yarn.lock b/glances/outputs/static/yarn.lock index 0db60e01..15e32092 100644 --- a/glances/outputs/static/yarn.lock +++ b/glances/outputs/static/yarn.lock @@ -525,6 +525,12 @@ clean-css@4.1.x: dependencies: source-map "0.5.x" +clean-webpack-plugin@^0.1.18: + version "0.1.18" + resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-0.1.18.tgz#2e2173897c76646031bff047c14b9c22c80d8c4a" + dependencies: + rimraf "^2.6.1" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"