From 3036a5dce5469bedc7c1592a484cea1afcac0698 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 9 Sep 2021 11:57:24 -0400 Subject: [PATCH] fix(@angular-devkit/build-angular): add web-streams-polyfill to downlevel exclusion list Polyfill related packages should not be downlevelled due to the nature of their code which may need to perform feature testing or leverage native capabilities to extract browser support information necessary to properly polyfill a given browser. In the case of `web-streams-polyfill`, it leverages the `%AsyncIteratorPrototype%`, when available, to fully polyfill its stream implementations. To access `%AsyncIteratorPrototype%`, a native async generator is needed and therefore the code present in the package cannot have this case of a native async generator downlevelled. `core-js` is also excluded for similar (and additional reasons). --- .../angular_devkit/build_angular/src/webpack/configs/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts index e443be6594cd..611bad7600cc 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts @@ -370,7 +370,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { test: /\.[cm]?js$|\.tsx?$/, // The below is needed due to a bug in `@babel/runtime`. See: https://github.com/babel/babel/issues/12824 resolve: { fullySpecified: false }, - exclude: [/[/\\](?:core-js|@babel|tslib|web-animations-js)[/\\]/], + exclude: [/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\]/], use: [ { loader: require.resolve('../../babel/webpack-loader'),