Skip to content

Commit 69739cc

Browse files
committed
refactor(@angular-devkit/build-angular): move babel build optimizer plugins 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'.
1 parent b24b444 commit 69739cc

16 files changed

Lines changed: 24 additions & 54 deletions

packages/angular/build/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ ts_project(
8282
":node_modules/@angular-devkit/core",
8383
":node_modules/@angular/ssr",
8484
":node_modules/@babel/core",
85-
":node_modules/@babel/helper-annotate-as-pure",
86-
":node_modules/@babel/helper-split-export-declaration",
8785
":node_modules/@inquirer/confirm",
8886
":node_modules/@oxc-project/types",
8987
":node_modules/@vitejs/plugin-basic-ssl",

packages/angular/build/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
"@ampproject/remapping": "2.3.0",
2222
"@angular-devkit/architect": "workspace:0.0.0-EXPERIMENTAL-PLACEHOLDER",
2323
"@babel/core": "8.0.1",
24-
"@babel/helper-annotate-as-pure": "8.0.0",
25-
"@babel/helper-split-export-declaration": "7.24.7",
2624
"@inquirer/confirm": "6.1.1",
2725
"@vitejs/plugin-basic-ssl": "2.3.0",
2826
"beasties": "0.4.3",

packages/angular/build/src/private.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export {
3232
} from './builders/dev-server/options';
3333

3434
// Tools
35-
export * from './tools/babel/plugins';
3635
export type { ExternalResultMetadata } from './tools/esbuild/bundler-execution-result';
3736
export { emitFilesToDisk } from './tools/esbuild/utils';
3837
export { transformSupportedBrowsersToTargets } from './tools/esbuild/utils';

packages/angular/build/src/tools/babel/plugins/index.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/angular/build/src/tools/babel/typings.d.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/angular/build/src/tools/babel/plugins/adjust-static-class-members.ts renamed to packages/angular_devkit/build_angular/src/tools/babel/plugins/adjust-static-class-members.ts

File renamed without changes.

packages/angular/build/src/tools/babel/plugins/adjust-static-class-members_spec.ts renamed to packages/angular_devkit/build_angular/src/tools/babel/plugins/adjust-static-class-members_spec.ts

File renamed without changes.

packages/angular/build/src/tools/babel/plugins/adjust-typescript-enums.ts renamed to packages/angular_devkit/build_angular/src/tools/babel/plugins/adjust-typescript-enums.ts

File renamed without changes.

packages/angular/build/src/tools/babel/plugins/adjust-typescript-enums_spec.ts renamed to packages/angular_devkit/build_angular/src/tools/babel/plugins/adjust-typescript-enums_spec.ts

File renamed without changes.

packages/angular/build/src/tools/babel/plugins/elide-angular-metadata.ts renamed to packages/angular_devkit/build_angular/src/tools/babel/plugins/elide-angular-metadata.ts

File renamed without changes.

0 commit comments

Comments
 (0)