Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove clean-webpack-plugin #52

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())
]
});
Loading