Closed
Description
repo to reproduce
https://github.com/kmsheng/core-js-bug
Note that core-js was imported twice,
one in src/js/index.js and the other one in assets/js/default.js
simlar issue
#741
repo to reproduce
https://github.com/kmsheng/core-js-bug
Note that core-js was imported twice,
one in src/js/index.js and the other one in assets/js/default.js
simlar issue
#741
Activity
jaynetics commentedon Jan 17, 2020
i encountered the same bug, and can confirm that importing core-js into two js files is the root cause. importing it in only one file fixes the problem.
11101101 commentedon Feb 10, 2020
I'm also running into the same issue. My code path results in a second import which causes the bug to manifest.
pierremanceaux commentedon Feb 12, 2020
In case this helps someone: JakeChampion/fetch#748
It would be great to identify which version of IE11 is/are affected, but it seems pretty recent to me, probably the last build.
aliaksandr-yermalayeu commentedon Feb 27, 2020
Hi everyone. I am facing the same issue. It is still reproduced in IE11 with the latest version of core-js. However the scenario is pretty tricky to reproduce. So I created a minimal repo with needed steps. Hope it helps.
sargismarkosyan commentedon Mar 5, 2020
Hi, the issue is reproducible with other regexp too for example
'/test/'.split(/\W/)
is returning["/", "t", "e", "s", "t", "/"]
but should return["", "test", ""]
.slowcheetah commentedon Mar 27, 2020
Please show your
npm list | grep core-js
aliaksandr-yermalayeu commentedon Apr 2, 2020
@slowcheetah, will result of
yarn list --pattern core-js
work for you?aliaksandr-yermalayeu commentedon Apr 7, 2020
I took a deeper dive into this issue. The problem is caused by this line. It turns out
regexp.exec
andregexpExec
are different references when polyfill is loaded twice.steveworkman commentedon Apr 23, 2020
Is there an older version of core-js that does not show this issue? It looks like there were changes related to adding more regexp.exec requires in 3.6.2
Would a downgrade to 3.6.1 work?
jdreesen commentedon Apr 23, 2020
I downgraded to
3.5.0
yesterday and it works for me.aliaksandr-yermalayeu commentedon Apr 23, 2020
The bug was introduced by version 3.6.0 due to support of
y
flag. In version 3.5.0exec
was never patched in IE.23 remaining items