Skip to content

Commit 276ce44

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular-devkit/build-angular): 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 8eb8a87 commit 276ce44

File tree

1 file changed

+5
-5
lines changed
  • packages/angular_devkit/build_angular/src/tools/webpack/configs

1 file changed

+5
-5
lines changed

packages/angular_devkit/build_angular/src/tools/webpack/configs/common.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise<Config
8383
// Load ESM `@angular/compiler-cli` using the TypeScript dynamic import workaround.
8484
// Once TypeScript provides support for keeping the dynamic import this workaround can be
8585
// changed to a direct dynamic import.
86-
const {
87-
GLOBAL_DEFS_FOR_TERSER,
88-
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
89-
VERSION: NG_VERSION,
90-
} = await loadEsmModule<typeof import('@angular/compiler-cli')>('@angular/compiler-cli');
86+
const { VERSION: NG_VERSION } =
87+
await loadEsmModule<typeof import('@angular/compiler-cli')>('@angular/compiler-cli');
88+
const { GLOBAL_DEFS_FOR_TERSER, GLOBAL_DEFS_FOR_TERSER_WITH_AOT } = await loadEsmModule<
89+
typeof import('@angular/compiler-cli/private/tooling')
90+
>('@angular/compiler-cli/private/tooling');
9191

9292
// determine hashing format
9393
const hashFormat = getOutputHashFormat(buildOptions.outputHashing);

0 commit comments

Comments
 (0)