We are having an issue (see https://github.com/angular/angular-cli/issues/16715) in our codebase where an update to the @angular-devkit/build-angular package that just updates the version of core-js from 3.3.6 to 3.6.0 causes the download of certain files to never stop downloading in IE11.
Any build that includes this commit (https://github.com/zloirock/core-js/commit/80d7bfee5e5974f4e5c591c80b0aff8362daf4e1) fails to load in IE11 with either a never ending spinner or a long running script error. No other errors ever present themselves in the console.
This problem exists in all versions 3.6.x.
Please let me know what else I can do to explore how this could be affecting the build and/or any questions you have for me about this.
I have tracked down my specific issue to the inclusion of of xregexp with the most recent version of core-js (3.6.4). You can download a project with this issue by going here https://github.com/jahumes/angular9-core-js-xregexp. It seems that the polyfill for sticky regex causes an infinite loop when being parsed by IE11.
I would totally do a pull request, but I am not an expert enough on what that commit does to regex to understand why it would suddenly break everything.
Confirming similar behavior in a React app after upgrading to 3.6.1 - we had to downgrade to get our app to load in IE 11. Same "long running script error" as above.
Also, happy to patch with a PR but also not clear what this commit does to regex
Made a simplify repo that has just webpack@4 + [email protected] + [email protected]; link here. IE will go into an infinite loop as soon as core-js/regexp and xregexp are loaded. The issue seems to be with core-js/features/regexp at this line. Only in IE will it return an empty array. All of this bubbles up to this line in xregexp that causes the infinite loop because token.length is zero when it gets assign to pos.
Captured this screenshot in regexp-exec where match shouldn't have an empty array.

@cvle I'm not much of an expert when regex sticky. Any idea what can be causing this?
Think this is related to alternatives in RegExp:
Test case 1: no alternatives (passes)
> let test = new RegExp("\\{([a-z]+)\\}", "yi");
/{([a-z]+)}/iy
> test.exec('{YYYY}')
["{YYYY}", "YYYY"]
> test.exec('{YYYY}')
null
Test 2 case: alternatives (fails)
> let test = new RegExp("\{([a-z]+)\}|[^\{]","yi")
/{([a-z]+)}|[^{]/iy
> test.exec('{YYYY}')
["{YYYY}", "YYYY"]
> test.exec('{YYYY}')
["", undefined]
> test.exec('{YYYY}')
["", undefined]
Was introduced by https://github.com/zloirock/core-js/pull/732
When is this planned to be addressed? We use core-js and are significantly impacted by this in one of our scenarios.
Let's track it here #810
Most helpful comment
Made a simplify repo that has just
webpack@4+[email protected]+[email protected]; link here. IE will go into an infinite loop as soon ascore-js/regexpandxregexpare loaded. The issue seems to be withcore-js/features/regexpat this line. Only in IE will it return an empty array. All of this bubbles up to this line in xregexp that causes the infinite loop becausetoken.lengthis zero when it gets assign topos.Captured this screenshot in

regexp-execwherematchshouldn't have an empty array.@cvle I'm not much of an expert when regex sticky. Any idea what can be causing this?