Skip to content

refactor(@angular-devkit/build-angular): move babel build optimizer plugins from @angular/build - #33751

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
clydin:refactor/move-babel-optimizer-plugins
Aug 5, 2026
Merged

refactor(@angular-devkit/build-angular): move babel build optimizer plugins from @angular/build#33751
alan-agius4 merged 1 commit into
angular:mainfrom
clydin:refactor/move-babel-optimizer-plugins

Conversation

@clydin

@clydin clydin commented Aug 4, 2026

Copy link
Copy Markdown
Member

The Babel-based build optimizer plugins ('adjust-static-class-members', 'adjust-typescript-enums', 'elide-angular-metadata', and 'pure-toplevel-functions') are no longer used by '@angular/build', which now uses an OXC-based AST transform for optimization in esbuild.

This change relocates these plugins and their associated unit tests out of '@angular/build' and directly into '@angular-devkit/build-angular', which is their sole remaining consumer.

Moving these plugins also allows removing '@babel/helper-annotate-as-pure' and '@babel/helper-split-export-declaration' as direct dependencies of '@angular/build'.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Aug 4, 2026

@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 relocates several Babel plugins (including adjust-static-class-members, adjust-typescript-enums, elide-angular-metadata, and pure-toplevel-functions) from @angular/build to @angular-devkit/build-angular. This involves updating dependencies, moving type declarations, and adjusting how these plugins are loaded in the application preset. The reviewer suggests statically importing these relocated plugins at the top of application.ts instead of using dynamic require calls inside the function, which would improve type safety and static analysis.

…lugins from @angular/build

The Babel-based build optimizer plugins ('adjust-static-class-members', 'adjust-typescript-enums', 'elide-angular-metadata', and 'pure-toplevel-functions') are no longer used by '@angular/build', which now uses an OXC-based AST transform for optimization in esbuild.

This change relocates these plugins and their associated unit tests out of '@angular/build' and directly into '@angular-devkit/build-angular', which is their sole remaining consumer.

Moving these plugins also allows removing '@babel/helper-annotate-as-pure' and '@babel/helper-split-export-declaration' as direct dependencies of '@angular/build'.
@clydin
clydin force-pushed the refactor/move-babel-optimizer-plugins branch from 69739cc to 03db815 Compare August 4, 2026 21:41
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 4, 2026
@clydin
clydin requested a review from alan-agius4 August 4, 2026 21:53
@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 Aug 5, 2026
@alan-agius4
alan-agius4 merged commit e213ce9 into angular:main Aug 5, 2026
40 of 41 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@clydin
clydin deleted the refactor/move-babel-optimizer-plugins branch August 5, 2026 12:13
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-devkit/build-angular 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