webpack/webpack-bundle-analyzer
47.6
Weak · 1 October 2026
5k
lines of production code
JavaScript
primary language
2
measurements over time
What this system is
This system is a Webpack bundle analyzer that parses build statistics to visualize and report on module sizes and compression ratios. It provides a CLI interface for generating static HTML reports, JSON data, or an interactive web server, supporting various compression algorithms like gzip and brotli. The tool features a modernized client-side interface with state management, dark mode, and detailed hierarchical tree views for inspecting bundle contents.
How it got here
2016 — Major architecture and tooling overhaul
9 changes.
This period involved a comprehensive rewrite of the project's internal architecture, CLI, and client-side UI, driven by a migration to modern build tools like Webpack and Jest. The update introduced MobX-based state management, replaced legacy dependencies with native modules and modern libraries, and significantly expanded test coverage to support new analysis modes and output formats.
2018–2026 — tree rewrite and release automation
7 changes.
The module tree visualization was completely rewritten to support nested folder merging, compression size calculations, and detailed bundle content breakdowns. This period also introduced release automation via changesets, added a PureComponent utility for optimized rendering, and expanded test coverage for Webpack 5 and various chunk edge cases.
Features
Add PureComponent utility for optimized rendering
A new PureComponent class has been added to the client library, extending Preact's Component to automatically optimize rendering performance. It implements a shallow comparison of props and state in shouldComponentUpdate, ensuring that components only re-render when their inputs actually change, which helps reduce unnecessary UI updates.
client/lib · high confidence
Added changeset configuration for release automation
The project now includes a \.changeset\ directory containing configuration for \@changesets/cli\, a tool used to manage versioning and changelog generation for the repository. This setup includes a custom changelog generator script that integrates with GitHub to link pull requests and commits, and a configuration file specifying the repository as 'webpack/webpack-bundle-analyzer' with public access. This enables automated version bumps and changelog entries based on commit messages and pull request summaries.
.changeset · high confidence
Removals
Removal of Webpack Bundle Visualizer view
The viewer template (viewer.pug) has been removed, eliminating the user-facing interface for the Webpack Bundle Visualizer. This change removes the associated client-side dependencies, including the foamtree visualization library, tooltip functionality, and the specific CSS and JavaScript assets required to render the bundle size treemap.
views · high confidence
Behavioural changes
CLI rewritten with Commander.js and new analysis modes
The CLI entry point has been completely rewritten to use the Commander.js library, replacing the previous manual argument parsing. This change introduces a structured help system that correctly handles the \-h\ flag for help messages, and adds support for three distinct output modes: \server\ (default, starts an HTTP server), \static\ (generates a single HTML file), and \json\ (generates a JSON report). Users can now configure the server host and port, specify a custom report title for reproducible builds, choose between gzip, brotli, or zstd compression algorithms for size calculations, set default treemap sizes, and exclude assets via regex patterns.
src/bin · high confidence
Complete rewrite of the module tree structure with nested folder merging and compression support
The module tree visualization logic in src/tree has been completely rewritten to provide a more detailed and accurate breakdown of bundle contents. The new implementation introduces a hierarchical tree structure (BaseFolder, Folder, ContentFolder) that supports merging nested folders to simplify the view. It specifically handles concatenated modules by displaying their internal contents as nested sub-folders and modules, allowing users to see what is bundled together. Additionally, the tree now calculates and exposes sizes for parsed, gzip, brotli, and zstd compression algorithms, enabling users to better understand the impact of different compression strategies on their bundle.
src/tree · high confidence
Introduce MobX-based state management with persistent user preferences
The client application now uses MobX to manage UI state, replacing the previous ad-hoc approach. This change introduces a centralized store that persists user settings—such as dark mode, selected chunk filters, and module size display options—to localStorage, ensuring preferences survive page reloads. It also enables new interactive features like searching and filtering modules by entrypoint, with the UI components wired to react to these state changes.
client · high confidence
Migrate build tooling and configuration to modern standards
The project has replaced the legacy Gulp build system with a Webpack-based development setup, removing \gulpfile.js\ and \gulp\ dependencies in favor of \webpack.config.js\ and npm scripts. Configuration files have been modernized: \.babelrc\ is replaced by \webpack.config.js\ and \tsconfig.json\ for TypeScript/JS type checking, and ESLint has moved from \.eslintrc.json\ to the flat \eslint.config.mjs\ format. Browser targeting is now centralized in \.browserslistrc\, and the Node.js version is pinned to v22.14.0 via \.nvmrc\. Additionally, the test runner has switched from Mocha to Jest, and Prettier configuration is now explicit in \prettier.config.mjs\.
(repo-wide) · high confidence
Rewrite of internal architecture and logging infrastructure
The analyzer's internal implementation has been rewritten to remove external dependencies like Lodash and Express, replacing them with native Node.js modules and the \sirv\ static server. A new \Logger\ class has been introduced to manage log levels and integrate with Webpack's built-in infrastructure logger, while \stats.json\ generation now uses a streaming approach for better performance with large files. The module parsing logic has been updated to use \acorn-walk\ and support modern JavaScript structures, and the viewer template has been migrated from Pug to a custom JavaScript renderer.
src · high confidence
Rewritten UI with Sidebar, Context Menu, and Dark Mode support
The client components have been completely rewritten to introduce a new settings sidebar (with pinning and resizing), a right-click context menu for chunk filtering, and a dark mode toggle. The treemap now supports switching between stat, parsed, gzip, brotli, and zstd sizes, and includes a search feature that highlights matching modules. The UI also features a new Button, Checkbox, Dropdown, and Search component, along with improved tooltip and icon handling.
client/components · high confidence
Fixes
Automated installation of Webpack test dependencies
A new shell script, bin/install-test-webpack-versions.sh, has been added to automate the installation of npm dependencies for Webpack test environments. This script iterates through directories under test/webpack-versions and runs npm install in each, facilitating the setup required for testing against multiple Webpack versions.
bin · high confidence
Test coverage
Added test coverage for stats with modules in chunks; Added test fixtures for invalid and missing chunk scenarios; Added tests for Webpack 5 bundle analysis; Expanded test coverage for diverse Webpack bundle formats; Expanded test suite for bundle analyzer and plugin behavior.
Dependencies
webpack-bundle-analyzer v5.4.0 dependency overhaul and Node 20+ requirement
The package has been updated to version 5.4.0, introducing a comprehensive dependency refresh and a stricter runtime environment. The minimum supported Node.js version is now 20.9.0, dropping support for older releases. The dependency tree has been significantly modernized: the runtime server is now powered by \sirv\ (v3.0.2) instead of \express\, and the CLI uses \commander\ (v14.0.2). Development tooling has also been upgraded, including \webpack\ to v5.105.2, \jest\ to v30.2.0, \eslint\ to v9.39.2, and \prettier\ to v3.8.0. Additionally, the project has migrated from \yarn.lock\ to \package-lock.json\ (lockfileVersion 3) and now uses \npm@10.1.0\ as the package manager.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 48 → 48 (-0.6)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 88 → 87 (-0.7)
- Architecture 91 → 92 (+0.8)
- Maturity 55 → 55 (+0.5)
- Readiness 50 → 49 (-0.9)
- Security 65 → 75 (+10.0)
- Accessibility 37 → 37 (+0.0)
- Performance 60 (new)
Resolved (6)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- Off-boarding risk: anonymized user #1
- Orphaned files with no living knowledge
- parseBundle (cognitive 24) (src/parseUtils.js)
New (16)
- Documentation: no architecture or design documentation (README.md)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- Logger.createInfrastructureLoggerAdapter (cognitive 24) (src/Logger.js)
- Logger.createInfrastructureLoggerAdapter (cyclomatic 18) (src/Logger.js)
- Low cohesion: ModulesTreemap (LCOM4 6) (client/components/ModulesTreemap.jsx)
- Off-boarding risk: anonymized user #1
- Outdated (npm): @discoveryjs/json-ext
- Outdated (npm): acorn
- Outdated (npm): acorn-walk
- Outdated (npm): commander
- Outdated (npm): ws
- apply (cognitive 16) (src/BundleAnalyzerPlugin.js)
- parseUtils.parseBundle (cognitive 24) (src/parseUtils.js)
- parseUtils.parseBundle (cyclomatic 33) (src/parseUtils.js)
Changes since last survey
- 3 commits — 3 feature/other, 0 fixes
By area
- (root) — 2 commits
- test/plugin.js — 1 commit
Notable commits
- change: chore(release): new release (#739)
- change: feat: Migrate to Webpack Built-in Infrastructure Logger with Backwards Compatibility (#738)
- change: test: add test coverage for analyzerMode (#740)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
webpack/webpack-bundle-analyzer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6046503c6e183cc2bcf069a7d58dcf87f4870f85 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.