Version 2.0.6 (active, monthly releases). Generates an HTML grid report from Webpack stats JSON, useful for visualizing bundle composition and size. Key differentiators: lightweight, no external dependencies, supports gzip size display, works both as a Webpack plugin and standalone Node API. Unlike webpack-bundle-analyzer, it produces a single static HTML file with grid layout.
npm install webpack-stats-reportVerified import paths — ran on the pinned version, not inferred.
Minimal Webpack config to generate a stats report HTML file with gzip sizes. Shows the plugin import and basic options.
Ensure the stats object passed to StatsReportGenerator has source: true, or it will silently omit gzip sizes.
Use named destructuring: const { StatsReportPlugin } = require('webpack-stats-report')Use require() in Node <12; or ensure 'type':'module' in package.json and use import {} from syntax.Use const { StatsReportPlugin } = require('webpack-stats-report');When calling stats.toJson(), pass { source: true }.Use const { StatsReportGenerator } = require('webpack-stats-report');No dependency data recorded yet.