-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE 11 + [email protected]: String.prototype.split doesn't work correctly #741
Comments
I was able to reproduce this in a browserify/babelify build when @babel/preset-env useBuiltIns is configured to 'usage' which adds the following core-js polyfills to the module doing a split with a regular expression.
In the short term, there where two ways I was able to work around this.
|
@randym I tested this case too. Could you add a reproducible example? |
@zloirock I've setup a repo to start pulling in the polyfills that my client's app used and see if I can reproduce it in a 'bare-ish' bones example. Just pulling in
In isolation was not enough to reproduce the problem. I've sent both of you collaborator invites with the understanding that @bloody-ux and I bear the burden of reproduction. |
Still the same with the example from your repo: I have no ideas about the order which could cause the problem, so waiting for that. Seems it's caused by #732, I thought about possible problems like this, but I didn't find them. |
I was able to reduce the problem to: import 'core-js/stable/string/split'; Once the regexp polyfills are included the problem goes away: import 'core-js/stable/regexp'; |
Could you check it with this patch? |
I've checked the fix and it does seem to address the problem in my use case. |
Gjøres pga følgende issues; JakeChampion/fetch#750 JakeChampion/fetch#748 zloirock/core-js#751 zloirock/core-js#741 I bunn og grunn, core-js@^3.6.0 introduserte støtte for String.prototype.split med regex som har sticky-flag. Pga bug her så fungerer ikke funksjonen som forventet noe mer i eldre IE11 versjoner. E.g `"test".split(/e/) === ['t', 'e', 's', 't']`, denne burde gitt `['t', 'st']`
I have the same problem with IE11 + core-js 3.6.5 + D3 + angular 9 I replaced the following line in my polyfills.ts to Note that the imports regexp and string are commented. So when your application needs to do a split it's using the native function of the browser instead of the split function in core-js I hope this can help someone |
downgrade to core-js 3.5.0 helps (no es.string.split module in bundle now) |
With downgraded version I get an error related to promise: "Object doesn't support property or method 'allSettled'" |
Var tidligere nødvendig for å låse core-js til 3.5.0 versjonen, siden alle nyere versjoner hadde en regex-bug. Dette skal nå være fikset i siste versjon, og dette var kun ett problem i eldre versjoner av IE11 som ikke er mye brukt noe mer. Tenker det derfor er innafor å teste ut om vi kan rydde opp litt i avhengighetene våre. For bedre dokumentasjon om vi skal reverte denne, så inkluderer jeg den originale commit-meldingen som introduserte overskrivingen; ``` Gjøres pga følgende issues; JakeChampion/fetch#750 JakeChampion/fetch#748 zloirock/core-js#751 zloirock/core-js#741 I bunn og grunn, core-js@^3.6.0 introduserte støtte for String.prototype.split med regex som har sticky-flag. Pga bug her så fungerer ikke funksjonen som forventet noe mer i eldre IE11 versjoner. E.g `"test".split(/e/) === ['t', 'e', 's', 't']`, denne burde gitt `['t', 'st']` ```
With core-js 3.6.1: '/home/sessionCheck.json'.split(//+/) will get:
The correct result should be:
The text was updated successfully, but these errors were encountered: