Library · Apr 2026 — present
Bundlelens
Measure and visualize JavaScript/TypeScript build data
Author & maintainer
Bundlelens is a MIT-licensed command-line tool that stays agnostic to bundlers: it executes your build or inspects an output directory, measures artifact sizes (raw, gzip, brotli), classifies files, builds rankings, and produces HTML and JSON reports. It can hook into your package manager for dependency auditing (npm, pnpm, Yarn, Bun) and compare two Git branches in isolated worktrees.
More detail
- Commands: `bundlelens init` scaffolds config; `bundlelens run` drives the build pipeline; `bundlelens analyze` measures an existing folder; `bundlelens compare` contrasts branches with reproducible checkouts.
- Reports surface objective bundle metrics for webpack, Vite, Next.js, and other stacks without prescribing a framework—useful for CI gates, regressions, and stakeholder-friendly HTML output.
- Optional audit integration queries the registry when enabled; branch comparison requires Git and uses worktrees to keep comparisons clean.
- Shipped on npm for Node 18+, with a `bundlelens.config.json` workflow and documented precedence between config file and CLI flags.
Stack
- TypeScript
- Node.js
Links
Public resources (open in a new tab).