diff --git a/frontend/package.json b/frontend/package.json index 60be48b5d..c18aba5f3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -29,7 +29,8 @@ "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "lint": "eslint src", - "cypress": "cypress open" + "cypress": "cypress open", + "analyze": "webpack-bundle-analyzer ./dist/bundle-report.json --default-sizes gzip" }, "keywords": [], "author": "", diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index c04f79ad0..da59009e8 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -18,7 +18,13 @@ const plugins = [ }), new webpack.HotModuleReplacementPlugin(), new Dotenv(), - new BundleAnalyzerPlugin(), + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + openAnalyzer: false, + generateStatsFile: true, + statsFilename: 'bundle-report.json', + }), + new CompressionPlugin(), ]; @@ -97,6 +103,7 @@ module.exports = { '@utils': path.resolve(__dirname, './src/utils'), }, }, + plugins, optimization: {