Skip to content

Commit 145f073

Browse files
authored
Vite 8 (#3174)
Redo of #3121. `npm run build` is very fast, no more esbuild dependency due to rolldown. The issues breaking the last one are gone — other deps released new versions compatible with Vite 8, and the issue that was breaking the Vercel preview is gone. Only downside is we get about 250 files instead of 100, as discussed in #3121. I don't think this is actually a problem in practice, it just feels silly. I tried using the `codeSplitting` setting to get a better set of chunks, but I couldn't get an overall breakdown I liked better than the default behavior. In #3121 I made a different judgment, but I changed my mind. The issues listed below suggest other people are having the same trouble. These are in a [Rolldown milestone](https://github.com/rolldown/rolldown/milestone/11) with a deadline of May 8, so maybe they will get to it soon. <details> <summary>Open rolldown issues around code splitting</summary> - **rolldown/rolldown#4932** — Direct request for `experimentalMinChunkSize`. The maintainers say `codeSplitting.groups` is the intended tool, but the discussion makes clear it doesn't solve the same problem. The workarounds all produce worse output than just accepting the small chunks. - **rolldown/rolldown#7473** — A frustrated Vite 8 user (575 chunks in prod) documenting the same struggle we just went through: every `codeSplitting` config either breaks execution order, pulls unexpected deps into bundles, or creates one giant blob. Filed as a request for better docs/strategy, still open. - **rolldown/rolldown#8707** — Request for `minSize` to apply globally (not just within groups), which would give the behavior we want. Closed as "not how minSize is intended to work." - **rolldown/rolldown#7114** — Tracking issue acknowledging the gaps: need presets/recipes, better `maxSize` behavior, barrel chunk elimination. </details>
1 parent a2773c4 commit 145f073

3 files changed

Lines changed: 1888 additions & 2366 deletions

File tree

0 commit comments

Comments
 (0)