Skip to content

Commit 4d5af43

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular/build): use Angular compiler CLI private tooling export
The `@angular/compiler-cli/private/tooling` package export is now used instead of the main package export to allow cleanup of the compiler-cli package. This secondary export has existed for several major versions.
1 parent 276ce44 commit 4d5af43

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/angular/build/src/tools/angular/compilation/jit-compilation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import type ng from '@angular/compiler-cli';
1010
import assert from 'node:assert';
1111
import ts from 'typescript';
12+
import { loadEsmModule } from '../../../utils/load-esm';
1213
import { profileSync } from '../../esbuild/profiling';
1314
import { AngularHostOptions, createAngularCompilerHost } from '../angular-host';
1415
import { createJitResourceTransformer } from '../transformers/jit-resource-transformer';
@@ -38,7 +39,9 @@ export class JitCompilation extends AngularCompilation {
3839
referencedFiles: readonly string[];
3940
}> {
4041
// Dynamically load the Angular compiler CLI package
41-
const { constructorParametersDownlevelTransform } = await AngularCompilation.loadCompilerCli();
42+
const { constructorParametersDownlevelTransform } = await loadEsmModule<
43+
typeof import('@angular/compiler-cli/private/tooling')
44+
>('@angular/compiler-cli/private/tooling');
4245

4346
// Load the compiler configuration and transform as needed
4447
const {

0 commit comments

Comments
 (0)