From abe605050ba4ca2720585cfe49e8c1d256e51266 Mon Sep 17 00:00:00 2001 From: hrocha16 Date: Sat, 9 Feb 2019 13:38:07 -0600 Subject: [PATCH] fix(@angular-devkit/build-angular): added warning for ES2017 --- .../angular-cli-files/models/webpack-configs/common.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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 372a5e05e330..1a40ab83023f 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 @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { tags } from '@angular-devkit/core'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; import * as path from 'path'; import { HashedModuleIdsPlugin, debug } from 'webpack'; @@ -272,6 +273,14 @@ export function getCommonConfig(wco: WebpackConfigOptions) { ); } + if (wco.tsConfig.options.target === 4) { + wco.logger.warn(tags.stripIndent` + WARNING: Zone.js does not support native async/await in ES2017. + These blocks are not intercepted by zone.js and will not triggering change detection. + See: https://github.com/angular/zone.js/pull/1140 for more information. + `); + } + return { mode: scriptsOptimization || stylesOptimization ? 'production'