diff --git a/frontend/config/webpack.config.js b/frontend/config/webpack.config.js index 9995d0556ab..ed33e2da0d3 100644 --- a/frontend/config/webpack.config.js +++ b/frontend/config/webpack.config.js @@ -23,6 +23,7 @@ const modules = require('./modules'); const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const webpackBundleTracker = require('webpack-bundle-tracker'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const ForkTsCheckerWebpackPlugin = process.env.TSC_COMPILE_ON_ERROR === 'true' @@ -317,6 +318,7 @@ module.exports = function (webpackEnv) { runtimeChunk: { name: 'runtime', }, + concatenateModules: false, }, resolve: { // This allows you to set a fallback for where webpack should look for modules. @@ -807,6 +809,7 @@ module.exports = function (webpackEnv) { filename: isEnvProduction ? './webpack-stats.pro.json' : './webpack-stats.dev.json', publicPath: isEnvProduction ? '' : paths.publicUrlOrPath }), + new BundleAnalyzerPlugin(), ].filter(Boolean), // Turn off performance processing because we utilize // our own hints via the FileSizeReporter diff --git a/frontend/package.json b/frontend/package.json index ce658daa5d8..57f3bdd66d9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -168,6 +168,7 @@ "url-loader": "4.1.1", "web-vitals": "2.1.4", "webpack": "^5.64.4", + "webpack-bundle-analyzer": "^4.10.2", "webpack-bundle-tracker": "1.7.0", "webpack-dev-server": "^4.6.0", "webpack-manifest-plugin": "^4.0.2",