Vite-bundle-visualizer v1.2.1 is a CLI tool to visualize Vite bundle sizes using rollup-plugin-visualizer. It generates interactive treemap, sunburst, network, raw data JSON, or list views. Unlike rollup-plugin-visualizer (a Vite plugin), this is a standalone CLI that runs `vite build` internally, so no plugin config needed. It requires Node ^18.19.0 || >=20.6.0, is ESM-only since v1.0.0, ships TypeScript types, and is actively maintained with monthly releases.
npm install vite-bundle-visualizerVerified import paths — ran on the pinned version, not inferred.
Generates a treemap visualization of your Vite bundle with sourcemap-based sizes, outputting stats.html.
Ensure your project uses ESM (package.json type: module) or use npx.
Replace -t json with -t raw-data.
Upgrade Node.js to a supported version.
Ensure vite.config.js exists or specify with -c.
Run 'npm install -D vite-bundle-visualizer' or use 'npx vite-bundle-visualizer'.
Use import() dynamic import, or switch project to ESM, or use npx.
Change to '--template raw-data' or '-t raw-data'.