Skip to content

Commit 7a93551

Browse files
committed
refactor(@angular-devkit/build-angular): compare the target with
ScriptTarget Compare with ScriptTarget and consider ES2017 and newer.
1 parent b95933a commit 7a93551

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
295295
);
296296
}
297297

298-
if (wco.tsConfig.options.target === 4) {
298+
if (wco.tsConfig.options.target !== undefined &&
299+
wco.tsConfig.options.target >= ts.ScriptTarget.ES2017) {
299300
wco.logger.warn(tags.stripIndent`
300301
WARNING: Zone.js does not support native async/await in ES2017.
301302
These blocks are not intercepted by zone.js and will not triggering change detection.

0 commit comments

Comments
 (0)