Skip to content

Commit

Permalink
chore: remove clean-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Dec 19, 2024
1 parent d98af8d commit b566a0d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
5 changes: 0 additions & 5 deletions dotnet-core/package.json__if_webpack

This file was deleted.

1 change: 0 additions & 1 deletion webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 2 additions & 9 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) || [];
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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())
]
});

0 comments on commit b566a0d

Please sign in to comment.