Skip to content

Commit b566a0d

Browse files
committed
chore: remove clean-webpack-plugin
1 parent d98af8d commit b566a0d

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

dotnet-core/package.json__if_webpack

Lines changed: 0 additions & 5 deletions
This file was deleted.

webpack/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"mini-css-extract-plugin": "^2.9.2",
4242
"aurelia-webpack-plugin": "^5.0.6",
4343
"duplicate-package-checker-webpack-plugin": "^3.0.0",
44-
"clean-webpack-plugin": "^4.0.0",
4544
"webpack": "^5.97.1",
4645
"webpack-cli": "^5.1.4",
4746
"webpack-dev-server": "^5.2.0",

webpack/webpack.config.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const { AureliaPlugin } = require('aurelia-webpack-plugin');
1010
const { ProvidePlugin } = require('webpack');
1111
// @endif
1212
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
13-
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
1413

1514
// config helpers:
1615
const ensureArray = (config) => config && (Array.isArray(config) ? config : [config]) || [];
@@ -85,6 +84,7 @@ module.exports = ({ production }, { analyze, hmr, port, host }) => ({
8584
},
8685
mode: production ? 'production' : 'development',
8786
output: {
87+
clean: true,
8888
path: outDir,
8989
publicPath: baseUrl,
9090
filename: production ? '[name].[chunkhash].bundle.js' : '[name].[fullhash].bundle.js',
@@ -349,13 +349,6 @@ module.exports = ({ production }, { analyze, hmr, port, host }) => ({
349349
{ from: 'static', to: outDir, globOptions: { ignore: ['.*'] } }
350350
]
351351
}), // ignore dot (hidden) files
352-
...when(analyze, new BundleAnalyzerPlugin()),
353-
/**
354-
* Note that the usage of following plugin cleans the webpack output directory before build.
355-
* In case you want to generate any file in the output path as a part of pre-build step, this plugin will likely
356-
* remove those before the webpack build. In that case consider disabling the plugin, and instead use something like
357-
* `del` (https://www.npmjs.com/package/del), or `rimraf` (https://www.npmjs.com/package/rimraf).
358-
*/
359-
new CleanWebpackPlugin()
352+
...when(analyze, new BundleAnalyzerPlugin())
360353
]
361354
});

0 commit comments

Comments
 (0)