diff --git a/dotnet-core/package.json__if_webpack b/dotnet-core/package.json__if_webpack deleted file mode 100644 index 4eb7a78..0000000 --- a/dotnet-core/package.json__if_webpack +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "clean-webpack-plugin": "^3.0.0" - } -} diff --git a/webpack/package.json b/webpack/package.json index 8cfedfc..eb5d8ba 100644 --- a/webpack/package.json +++ b/webpack/package.json @@ -41,7 +41,6 @@ "mini-css-extract-plugin": "^2.9.2", "aurelia-webpack-plugin": "^5.0.6", "duplicate-package-checker-webpack-plugin": "^3.0.0", - "clean-webpack-plugin": "^4.0.0", "webpack": "^5.97.1", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.2.0", diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 44b749e..83cb826 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -10,7 +10,6 @@ const { AureliaPlugin } = require('aurelia-webpack-plugin'); const { ProvidePlugin } = require('webpack'); // @endif const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); // config helpers: const ensureArray = (config) => config && (Array.isArray(config) ? config : [config]) || []; @@ -85,6 +84,7 @@ module.exports = ({ production }, { analyze, hmr, port, host }) => ({ }, mode: production ? 'production' : 'development', output: { + clean: true, path: outDir, publicPath: baseUrl, filename: production ? '[name].[chunkhash].bundle.js' : '[name].[fullhash].bundle.js', @@ -349,13 +349,6 @@ module.exports = ({ production }, { analyze, hmr, port, host }) => ({ { from: 'static', to: outDir, globOptions: { ignore: ['.*'] } } ] }), // ignore dot (hidden) files - ...when(analyze, new BundleAnalyzerPlugin()), - /** - * Note that the usage of following plugin cleans the webpack output directory before build. - * In case you want to generate any file in the output path as a part of pre-build step, this plugin will likely - * remove those before the webpack build. In that case consider disabling the plugin, and instead use something like - * `del` (https://www.npmjs.com/package/del), or `rimraf` (https://www.npmjs.com/package/rimraf). - */ - new CleanWebpackPlugin() + ...when(analyze, new BundleAnalyzerPlugin()) ] });