Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): remove use of deprecated ngt…
Browse files Browse the repository at this point in the history
…ools 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.
  • Loading branch information
clydin authored and alan-agius4 committed Apr 5, 2021
1 parent 03a00ee commit 8770d5f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -30,7 +30,7 @@ function createIvyPlugin(
wco: WebpackConfigOptions,
aot: boolean,
tsconfig: string,
): ivy.AngularWebpackPlugin {
): AngularWebpackPlugin {
const { buildOptions } = wco;
const optimize = buildOptions.optimization.scripts;

Expand All @@ -51,7 +51,7 @@ function createIvyPlugin(
}
}

return new ivy.AngularWebpackPlugin({
return new AngularWebpackPlugin({
tsconfig,
compilerOptions,
fileReplacements,
Expand All @@ -68,7 +68,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions) {
rules: [
{
test: /\.[jt]sx?$/,
loader: ivy.AngularWebpackLoaderPath,
loader: AngularWebpackLoaderPath,
},
],
},
Expand Down Expand Up @@ -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],
},
],
},
Expand Down

0 comments on commit 8770d5f

Please sign in to comment.