Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Latest commit

 

History

History
35 lines (26 loc) · 824 Bytes

File metadata and controls

35 lines (26 loc) · 824 Bytes

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
        }),
    ],
}