Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Oct 1, 2025

Rollup currently appears to be more effective at optimizing total output chunk count. While this is investigated further, the experimental chunk optimizer will be switched back to using rollup.

Rollup currently appears to be more effective at optimizing total output
chunk count. While this is investigated further, the experimental chunk
optimizer will be switched back to using rollup.
@clydin clydin added the target: patch This PR is targeted for the next patch release label Oct 1, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 1, 2025
@clydin clydin requested a review from alan-agius4 October 1, 2025 15:12
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 1, 2025
@clydin clydin merged commit 4779fe3 into angular:20.3.x Oct 1, 2025
35 checks passed
@clydin clydin deleted the chunk-optimizer/use-rollup branch October 1, 2025 15:28
@TheAlexLichter
Copy link

TheAlexLichter commented Oct 6, 2025

Possibly related: rolldown/rolldown#5726

Generally it would be interesting to see what the difference between rolldown & rollup was, ideally with tested code so we can have a look 👍
With the advancedChunks API, there should be a lot of room for optimization that can be applied at the code base level (if you'd expose that option to the user).


const result = await bundle.generate({
minify: { mangle: false, compress: false },
advancedChunks: { minSize: 8192 },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option won't have effect unless group is specified. There should be a warning about it (rolldown/rolldown#5009).
A correct option would be like

advancedChunks: { groups: [{ name: 'chunks' }], minSize: 8192 }

(you would probably want to add maxSize as well, otherwise a huge chunk will be generated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants