Anonymous View
Skip to content

perf(@angular/build): default chunk optimization to use Rolldown#33397

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:perf-default-rolldown-optimizer
Open

perf(@angular/build): default chunk optimization to use Rolldown#33397
clydin wants to merge 1 commit into
angular:mainfrom
clydin:perf-default-rolldown-optimizer

Conversation

@clydin

@clydin clydin commented Jun 17, 2026

Copy link
Copy Markdown
Member

Now that Rolldown is stable, swap the default chunk optimizer from Rollup to Rolldown to utilize native compilation benefits and optimize heap memory usage.

Rollup remains an optional peer dependency of @angular/build, allowing users to opt back into Rollup by setting the environment variable NG_BUILD_CHUNKS_ROLLDOWN=false if it is also installed in the project.

@angular-robot angular-robot Bot added area: performance Issues related to performance area: @angular/build labels Jun 17, 2026
Now that Rolldown is stable, swap the default chunk optimizer from Rollup to Rolldown to utilize native compilation benefits and optimize heap memory usage.

Rollup remains an optional peer dependency of @angular/build, allowing users to opt back into Rollup by setting the environment variable `NG_BUILD_CHUNKS_ROLLDOWN=false` if it is also installed in the project.
@clydin clydin force-pushed the perf-default-rolldown-optimizer branch from 6dd5625 to b2061e9 Compare June 17, 2026 17:40
@clydin clydin marked this pull request as ready for review June 17, 2026 19:07

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request switches the default chunk optimizer from Rollup to Rolldown by setting 'useRolldownChunks' to default to 'true'. As a result, 'rollup' is transitioned to an optional peer dependency and is dynamically imported only when Rolldown is disabled. Feedback on the changes highlights a TypeScript compilation issue where the dynamically imported 'rollup' variable is declared without a type annotation, resulting in an implicit 'any' type under strict settings.

Comment thread packages/angular/build/src/builders/application/chunk-optimizer.ts
@clydin clydin requested a review from alan-agius4 June 17, 2026 19:11
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/build area: performance Issues related to performance target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant