Skip to content

Commit 9d45b77

Browse files
clydinfilipesilva
authored andcommitted
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). (cherry picked from commit 590c156)
1 parent d7dff9b commit 9d45b77

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
460460
test: /\.[cm]?js$|\.tsx?$/,
461461
// The below is needed due to a bug in `@babel/runtime`. See: https://github.com/babel/babel/issues/12824
462462
resolve: { fullySpecified: false },
463-
exclude: [/[\/\\](?:core-js|\@babel|tslib|web-animations-js)[\/\\]/],
463+
exclude: [/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\]/],
464464
use: [
465465
{
466466
loader: require.resolve('../../babel/webpack-loader'),

0 commit comments

Comments
 (0)