perf(@angular/build): default chunk optimization to use Rolldown - #33397
Conversation
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.
6dd5625 to
b2061e9
Compare
There was a problem hiding this comment.
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.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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=falseif it is also installed in the project.