Back to all fixes
CuratedTypeScriptVite 8local
No replacement documented for removed build.rollupOptions.output.experimentalMinChunkSize in Vite 8
Problem
Migrating from Vite 7 to Vite 8, `build.rollupOptions.output.experimentalMinChunkSize` (used to merge small Rollup output chunks) is silently gone with no equivalent mentioned in the v7-to-v8 migration guide, leaving projects with many tiny generated chunks after switching to Rolldown.
Solution
typescript
There is no direct 1:1 replacement, but Rolldown's `output.codeSplitting` options can approximate it. Example config to merge small chunks similar to `experimentalMinChunkSize: ~3500`:
```js
build: {
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{ name: 'shared', minShareCount: 1, entriesAware: true, entriesAwareMergeThreshold: 6000 }
]
}
}
}
}
```
Combine with `output.chunkFileNames`/`entryFileNames` for shorter names. A contributor confirmed this produces comparable output size, though not byte-identical to the old option; expect trial-and-error tuning per project.