webpack-visualizer-plugin2
Version:
Generate webpack bundle chart
36 lines (26 loc) • 824 B
Markdown
This is a working fork of the unmaintained [webpack-visualizer-plugin](https://github.com/chrisbateman/webpack-visualizer)
It works with webpack 5.x
```
npm i -D webpack-visualizer-plugin2
```
This will generate the statistics page in /stats/ folder
NOTE: "filename" points to the webpack output path, not the project root path
```js
const Visualizer = require('webpack-visualizer-plugin2');
module.exports = {
plugins: [
new Visualizer(
{
filename: path.join('..', 'stats', 'statistics.html'),
throwOnError: true,
},
{
chunkModules: true
}),
],
}
```
