You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aim is to improve the output chunking to follow the limitation set by advancedChunks option. The aim is to improve the output chunking when the advancedChunks option is not specified.
Currently, IIUC Rolldown does not try merging sideeffect free chunks. Without doing this, many small chunks would be generated when there's multiple entries.
For example, for the following modules, Rolldown currently generates 3 entry chunks and 2 shared chunks.
If common1 and common2 don't have a side effect, this can be improved to 3 entry chunks and 1 shared chunk. This is what rollup does when output.experimentalMinChunkSize is set (bundler explorer).
If page-a and page-b and page-c also don't have a side effect, this can be further improved to only 3 entry chunks (bundler explorer).
What problem does this feature solve?
The aim is to improve the output chunking to follow the limitation set byThe aim is to improve the output chunking when theadvancedChunksoption.advancedChunksoption is not specified.Currently, IIUC Rolldown does not try merging sideeffect free chunks. Without doing this, many small chunks would be generated when there's multiple entries.
For example, for the following modules, Rolldown currently generates 3 entry chunks and 2 shared chunks.
If
common1andcommon2don't have a side effect, this can be improved to 3 entry chunks and 1 shared chunk. This is what rollup does whenoutput.experimentalMinChunkSizeis set (bundler explorer).If
page-aandpage-bandpage-calso don't have a side effect, this can be further improved to only 3 entry chunks (bundler explorer).Related Rollup PRs: rollup/rollup#4705, rollup/rollup#4989
What does the proposed API look like?
Not an API change.