Skip to content

Commit b611e7f

Browse files
hrocha16alexeagle
authored andcommitted
fix(@angular-devkit/build-angular): added warning for ES2017
1 parent af88936 commit b611e7f

File tree

1 file changed

+9
-0
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+9
-0
lines changed

Diff for: packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8+
import { tags } from '@angular-devkit/core';
89
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
910
import * as path from 'path';
1011
import { HashedModuleIdsPlugin, debug } from 'webpack';
@@ -272,6 +273,14 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
272273
);
273274
}
274275

276+
if (wco.tsConfig.options.target === 4) {
277+
wco.logger.warn(tags.stripIndent`
278+
WARNING: Zone.js does not support native async/await in ES2017.
279+
These blocks are not intercepted by zone.js and will not triggering change detection.
280+
See: https://github.com/angular/zone.js/pull/1140 for more information.
281+
`);
282+
}
283+
275284
return {
276285
mode: scriptsOptimization || stylesOptimization
277286
? 'production'

0 commit comments

Comments
 (0)