diff options
author | Nolan Lawson <nolan@nolanlawson.com> | 2017-05-22 06:42:11 -0700 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-22 15:42:11 +0200 |
commit | 60e2b951dedfd0c97945c50248eacb812e1d61b3 (patch) | |
tree | bd33859f28d5564a5eef0981d50eee31d6a34d63 /config/webpack | |
parent | a94c152fd30cb91c1f4bd9c1e000ea68d0385bfa (diff) |
Add webpack-bundle-analyzer for production builds (#3170)
Diffstat (limited to 'config/webpack')
-rw-r--r-- | config/webpack/production.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/webpack/production.js b/config/webpack/production.js index 6969f04a8..5f6977936 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -6,6 +6,7 @@ const webpack = require('webpack'); const merge = require('webpack-merge'); const CompressionPlugin = require('compression-webpack-plugin'); const sharedConfig = require('./shared.js'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; module.exports = merge(sharedConfig, { @@ -29,5 +30,10 @@ module.exports = merge(sharedConfig, { algorithm: 'gzip', test: /\.(js|css|svg|eot|ttf|woff|woff2)$/, }), + new BundleAnalyzerPlugin({ // generates report.html and stats.json + analyzerMode: 'static', + generateStatsFile: true, + openAnalyzer: false, + }), ], }); |