Bundle size history for Vite projects, commit by commit
Vite's fast dev server can make bundle bloat invisible until you look at what gets shipped. Because Vite outputs a Rollup bundle, its production assets are clean and well-split — but clean does not mean it is not growing. A dependency upgrade, a new dynamic import that lands in the wrong chunk, or a CSS-in-JS library that balloons at build time can all slip past. dendrobundle reads the raw-data output from rollup-plugin-visualizer, records a snapshot per commit, and alerts you when an asset crosses your budget.
Set it up for Vite
Vite builds on Rollup, so stats come from rollup-plugin-visualizer configured with template: 'raw-data', which writes a JSON file alongside your build that dendrobundle parses.
# vite.config.ts — add the visualizer (build-time only; nothing ships to users):
# import { visualizer } from 'rollup-plugin-visualizer';
# plugins: [visualizer({ template: 'raw-data', filename: 'dist/rollup-stats.json' })]
# 1. build (writes dist/rollup-stats.json)
npm run build
# 2. submit the snapshot
curl -sS "https://dendrobundle.com/api/push?branch=$(git branch --show-current)&commit=$(git rev-parse HEAD)" \
-H "Authorization: Bearer $DENDROBUNDLE_TOKEN" \
-H "Content-Type: application/json" \
-d @dist/rollup-stats.jsonFull details on the supported formats and CI integration pages.
Vite bundle tracking — FAQ
- Does the visualizer plugin add anything to my production bundle?
- No. rollup-plugin-visualizer is a build-time Rollup plugin. It inspects the bundle at the end of the build and writes a stats file to disk. It does not inject any code into your output assets — the plugin exists only in your vite.config, not in anything your users download.
- I use Vite with React, Vue, or Svelte — does that matter?
- No. dendrobundle parses the Rollup stats file regardless of which framework sits above Vite. The stats capture assets and modules; framework-level component code shows up as ordinary modules in the tree.
- What is the difference between the visualizer templates?
- dendrobundle works with the raw-data template, not the HTML-based treemap or sunburst templates. Those are for human inspection in a browser; raw-data writes a plain JSON file with module-level byte counts that dendrobundle can parse and store. Set template: 'raw-data' and a filename ending in .json and you are done.
- How do I track multiple builds (client, SSR) separately?
- Create one dendrobundle project per build output and POST each stats file with its own token. A client build and an SSR bundle would be two projects, so their histories stay separate and budgets can be set independently.
Sign up free and connect your first Vite project in under five minutes, or upload a rollup-stats JSON at dendrobundle.com/analyze to see the treemap before committing to anything.
create a free account