Skip to content

Commit

Permalink
chore(webpack): add analyze duplicate package checker (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy authored Dec 18, 2023
1 parent 3d0c158 commit d5bac8b
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 0 deletions.
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@
"css-loader": "^6.8.1",
"depcheck": "^1.4.3",
"download": "^8.0.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"electron": "^23.3.9",
"enzyme": "^3.11.0",
"eslint": "^8.44.0",
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const webpack = require('webpack');

const autoprefixer = require('autoprefixer');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
const { merge } = require('webpack-merge');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

Expand Down Expand Up @@ -66,6 +67,7 @@ module.exports = (env, argv) => {
webpackDependenciesPlugin,
...(argv.analyze
? [
new DuplicatePackageCheckerPlugin(),
new BundleAnalyzerPlugin({
analyzerPort: 'auto',
}),
Expand Down

0 comments on commit d5bac8b

Please sign in to comment.