Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): add web-streams-polyfill to downl…
Browse files Browse the repository at this point in the history
…evel 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)
  • Loading branch information
clydin authored and filipesilva committed Oct 5, 2021
1 parent d7dff9b commit 9d45b77
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -460,7 +460,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'),
Expand Down

0 comments on commit 9d45b77

Please sign in to comment.