Skip to content

test(@angular/build): add e2e test for animations chunk optimization#33035

Open
clydin wants to merge 1 commit intoangular:mainfrom
clydin:e2e/chunk-optimizer-animations
Open

test(@angular/build): add e2e test for animations chunk optimization#33035
clydin wants to merge 1 commit intoangular:mainfrom
clydin:e2e/chunk-optimizer-animations

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Apr 22, 2026

Add an E2E test case to verify that the chunk optimizer does not fold lazy-loaded animations modules back into the primary main chunk. The test installs the matching version of @angular/animations, injects provideAnimationsAsync, and builds the test project with chunk optimization enabled. It then validates that the AnimationEngine is preserved within one of the independent lazy chunks and is absent from the initial main.js output.

@clydin clydin force-pushed the e2e/chunk-optimizer-animations branch from dbee562 to bf14512 Compare April 22, 2026 21:16
@clydin clydin marked this pull request as ready for review April 22, 2026 21:32
@clydin clydin added target: minor This PR is targeted for the next minor release action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 22, 2026
Copy link
Copy Markdown

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

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 enables the compact output option in the Rollup-based chunk optimizer and introduces a new E2E test to verify that Angular animations are correctly handled during chunk optimization. Feedback suggests applying the compact setting to the Rolldown configuration for consistency, using regular expressions for more robust configuration patching in tests, and removing a redundant build step to optimize test execution time.

Comment thread packages/angular/build/src/builders/application/chunk-optimizer.ts
Comment thread tests/e2e/tests/build/chunk-optimizer-animations.ts Outdated
Comment thread tests/e2e/tests/build/chunk-optimizer-animations.ts Outdated
Add an E2E test case to verify that the chunk optimizer does not fold lazy-loaded animations modules back into the primary main chunk. The test installs the matching version of @angular/animations, injects provideAnimationsAsync, and builds the test project with chunk optimization enabled. It then validates that the AnimationEngine is preserved within one of the independent lazy chunks and is absent from the initial main.js output.
@clydin clydin force-pushed the e2e/chunk-optimizer-animations branch from bf14512 to fdce97f Compare April 22, 2026 21:41
@clydin clydin requested a review from alan-agius4 April 22, 2026 21:58
@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 Apr 23, 2026
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: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants