Add webpack-bundle-analyzer for production builds (#3170)
This commit is contained in:
committed by
Eugen Rochko
parent
a94c152fd3
commit
60e2b951de
@ -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,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
Reference in New Issue
Block a user