From 4138c580bc70421d51e62ecbb74af3725a1c495c Mon Sep 17 00:00:00 2001 From: Fred Carlsen Date: Mon, 10 Dec 2018 17:47:54 +0100 Subject: Add bundle analyzer --- packages/website/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/website/webpack.config.js') diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index 32e16eeef..aaaa31082 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -3,6 +3,7 @@ const webpack = require('webpack'); const TerserPlugin = require('terser-webpack-plugin'); const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin'); const childProcess = require('child_process'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const GIT_SHA = childProcess .execSync('git rev-parse HEAD') @@ -115,6 +116,9 @@ module.exports = (_env, argv) => { let plugins = []; if (argv.mode === 'development') { config.mode = 'development'; + plugins.concat([ + new BundleAnalyzerPlugin(), + ]); } else { config.mode = 'production'; plugins = plugins.concat([ -- cgit v1.2.3