From 8770d5f015c5ad27e4b79b79edf256b00b3fd1b5 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 5 Apr 2021 10:18:39 -0400 Subject: [PATCH] refactor(@angular-devkit/build-angular): remove use of deprecated ngtools ivy namespace export With the removal of the deprecated ViewEngine-based Webpack plugin, the ivy namespace export that was previously used is now deprecated in favor of direct exports of the Ivy-based plugin. --- .../build_angular/src/webpack/configs/typescript.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts b/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts index 656fd2dbf1..58ef4baf50 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts @@ -8,7 +8,7 @@ import { buildOptimizerLoaderPath } from '@angular-devkit/build-optimizer'; import { getSystemPath } from '@angular-devkit/core'; import { CompilerOptions } from '@angular/compiler-cli'; -import { ivy } from '@ngtools/webpack'; +import { AngularWebpackLoaderPath, AngularWebpackPlugin } from '@ngtools/webpack'; import { WebpackConfigOptions } from '../../utils/build-options'; function ensureIvy(wco: WebpackConfigOptions): void { @@ -30,7 +30,7 @@ function createIvyPlugin( wco: WebpackConfigOptions, aot: boolean, tsconfig: string, -): ivy.AngularWebpackPlugin { +): AngularWebpackPlugin { const { buildOptions } = wco; const optimize = buildOptions.optimization.scripts; @@ -51,7 +51,7 @@ function createIvyPlugin( } } - return new ivy.AngularWebpackPlugin({ + return new AngularWebpackPlugin({ tsconfig, compilerOptions, fileReplacements, @@ -68,7 +68,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions) { rules: [ { test: /\.[jt]sx?$/, - loader: ivy.AngularWebpackLoaderPath, + loader: AngularWebpackLoaderPath, }, ], }, @@ -97,13 +97,13 @@ export function getAotConfig(wco: WebpackConfigOptions) { }, ] : []), - ivy.AngularWebpackLoaderPath, + AngularWebpackLoaderPath, ], }, // "allowJs" support with ivy plugin - ensures build optimizer is not run twice { test: /\.jsx?$/, - use: [ivy.AngularWebpackLoaderPath], + use: [AngularWebpackLoaderPath], }, ], },