From 9659655e2709182242400c999a814864e181928b Mon Sep 17 00:00:00 2001 From: Alfred Melch Date: Sat, 14 Dec 2019 13:50:17 +0100 Subject: [PATCH] Run bundle analyzer only in dev --- webpack.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index ee18a50..5c5642e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -63,7 +63,6 @@ module.exports = (env, argv) => { // show a progress bar new WebpackBar(), // create a report.html for bundle size - new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false }), // extract css to css files isEnvProduction && new MiniCssExtractPlugin({ @@ -76,6 +75,11 @@ module.exports = (env, argv) => { cssProcessorOptions: { map: { inline: false, annotation: true } } + }), + isEnvDevelopment && + new BundleAnalyzerPlugin({ + analyzerMode: 'static', + openAnalyzer: false }) // hot reload not working right now // isEnvDevelopment &&