npm / webpack-bundle-analyzer
webpack-bundle-analyzer
What changed in webpack-bundle-analyzer 4 to 5, from its official release notes, upgrade guides and advisories. Also covers @types/webpack-bundle-analyzer. Sources checked 2026-11-30.
2 breaking2 deprecations1 performance15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initwebpack-bundle-analyzer 517 changes
Deprecations 2
The plugin uses Webpack's infrastructure logger when available, so logging can be configured through Webpack's native infrastructureLogging configuration.
The plugin's logLevel option is deprecated in favor of Webpack's native infrastructureLogging configuration.
Performance 1
Improves report generation performance for compilations with many assets.
Fixes and other changes 14
Accepts brotli and zstd; when --compression-algorithm is omitted, either value also selects that compression algorithm.
Fixes a stack overflow when a chunk contains around 130,000 or more modules.
Module and folder parsed sizes are counted in UTF-8 bytes instead of UTF-16 code units, matching asset parsed size and compressed sizes.
Absolute Windows module paths retain their drive letters and UNC module paths retain their servers, preventing modules that differ only by drive or server from being merged in the report.
Prevents a TypeError when child compilations or entrypoints have undefined or missing assets.
Fixes the context menu background and border colors in dark mode.
Prevents modules from being counted twice when both a directory and modules inside it match the search.
Keeps modules in the report when their names use Windows path separators, including absolute paths from another drive.
Parsed and compressed sizes are scoped to the asset they were parsed from, so assets that reuse module IDs or share a module no longer report each other's sizes.
Resolves bundle assets and report files against the correct compiler output path when a plugin instance is shared by multiple compilers.
Parses Webpack 5 module maps nested in UMD wrappers, using bundle module IDs and runtime structure to choose among IIFE candidates.
Explicitly defines stats.toJson() options for bundle analysis, supporting Rspack 2.0 with minimal code changes.
Fixes the treemap so it reflects chunk checkbox selections.
Fixed a race condition in writeStats that could lead to incorrect content in stats.json.
webpack-bundle-analyzer 43 changes
Breaking changes 2
Support for Node.js 6 and 8 was dropped; Node.js v10.13.0 is now the minimum required version.
Adds support for Webpack 5.
Fixes and other changes 1
Prevents crashes when openAnalyzer is true in environments with no program to handle opening.