feat(bundle): Add bundle visualisation tool

This commit is contained in:
Stuart Taylor
2018-01-01 13:01:18 +00:00
parent 00cc2ebc21
commit fafb53f11e
4 changed files with 210 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ var webpack = require('webpack');
var path = require('path');
var ManifestPlugin = require('webpack-manifest-plugin');
var ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');
const Visualizer = require('webpack-visualizer-plugin');
var __DEV__ = process.env.NODE_ENV !== 'production';
@@ -60,7 +61,9 @@ module.exports = {
'debug/src/browser'
),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(true)
new webpack.optimize.OccurenceOrderPlugin(true),
// this will output a .html file in output.path
new Visualizer({ filename: 'webpack-bundle-stats.html' })
]
};