Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webpack-visualizer-plugin2

jonamat96.3kMIT1.2.0

Generate webpack bundle chart

webpack, statistics, bundle, chunks

readme

Webpack Visualizer 2

This is a working fork of the unmaintained webpack-visualizer-plugin

It works with webpack 5.x

Installation

npm i -D webpack-visualizer-plugin2

Usage in webpack configuration

This will generate the statistics page in /stats/ folder NOTE: "filename" points to the webpack output path, not the project root path

const Visualizer = require('webpack-visualizer-plugin2');

module.exports = {
    plugins: [
        new Visualizer(
        {
            filename: path.join('..', 'stats', 'statistics.html'),
            throwOnError: true,
        },
        {
            chunkModules: true
        }),
    ],
}