Skip to content

Conversation

@david-crespo
Copy link
Collaborator

Closes #2019

Biggest chunk of the bundle is now down to 170kb from around 400kb. That's pretty good.

image

Using experimentalMinChunkSize in the rollup options keeps us from having 222 separate JS files, some of which would be tiny. We have 94. There could be fewer but this isn't that bad. Increasing the min chunk size doesn't actually make it merge all the small chunks for some reason — we can look into that later.

vite v6.1.0 building for production...
✓ 3928 modules transformed.
Initially, there are
222 chunks, of which
207 are below minChunkSize.
After merging chunks, there are
94 chunks, of which
79 are below minChunkSize.

Biggest chunk breakdown

Using the trusty npx vite-bundle-visualizer we can see the main bundle is down to pretty key stuff like React, React Router, Tanstack Query, Floating UI.

image

@vercel
Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Feb 28, 2025 10:12pm

@david-crespo david-crespo enabled auto-merge (squash) February 28, 2025 21:56
@david-crespo david-crespo merged commit a3566bd into main Feb 28, 2025
7 checks passed
@david-crespo david-crespo deleted the last-few-routes branch February 28, 2025 22:37
david-crespo added a commit that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More aggressive bundle splitting

2 participants