Thunderbolt ships with vite-bundle-analyzer wired in, but it is disabled by default so it doesn't slow down normal builds or break CI on missing stats.html.
There are two ways to turn it on:
-
Run the dedicated script (convenient for local use):
bun analyze # alias for `vite analyze` -
Toggle it for any build by setting an environment variable (handy in CI):
ANALYZE=true bun run build # generates dist/stats.html alongside a normal production build
In both cases the plugin runs in static mode and writes dist/stats.html; it will not try to open a browser automatically.