From 48a9d211623b37ebc788d42487501b7520b9dcb5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 13 Apr 2018 17:21:02 +0100 Subject: [PATCH] fix(@angular-devkit/build-optimizer): remove side effects override Also prevent Build Optimizer from running twice on Angular packages. Partially address https://github.com/angular/angular-cli/issues/10322. --- .../src/angular-cli-files/models/webpack-configs/common.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index e80f5281bf..5e22fd11f1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -251,10 +251,10 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } }, { - test: /[\/\\]@angular[\/\\].+\.js$/, - sideEffects: false, + // Mark files inside `@angular/core` as using SystemJS style dynamic imports. + // Removing this will cause deprecation warnings to appear. + test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, parser: { system: true }, - ...buildOptimizerUseRule, }, { test: /\.js$/,