-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
cant get redux-toolkit to work in IE11 #351
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
Comments
|
Unfortunately, after some more digging it would appear it has something to do with
however, The below gives me the error i see above (initial issue)... same todos..
Hope that helps in anyway? |
What specific version of Redux Toolkit are you using? Can you recreate the issue in a CodeSandbox? |
Thanks for replying, saw the issue was closed and was like oh lol. ^1.2.3 is my current version - i could try the 1.2.4? but not sure this would fix it... I maybe could try a bit later/tomorrow to put into CodeSandbox if that helps? |
Shouldn't be any actual difference between 1.2.3 and 1.2.3 in that regard, since it was just a types change. But yeah, if you can put it in a sandbox, that would help. |
Note that #152 was a previous issue that might be related. |
This seems like your core-js "toPrimitive" polyfill possibly conflcts with another polyfill that does something similar, like in this issue: zloirock/core-js#566 Looking further at this, this looks pretty much like a bundling/polyfill issue on your side. |
So yes, you are getting this error when invoking RTK. But that's only because configureStore calls |
You are completely correct. This issue was a bundling one... Basically a library i used bundles its lib with polyfills included and this used core-js: 3.4.5 and this app used 3.6.5... if i set it to 3.4.5 it all started working. thanks @phryneas and @markerikson for all your help. Maybe we should never include polyfills by default and let the consumer decide how to use it... |
@MMT-LD you're welcome. |
@phryneas No sorry my bad probably led you down the wrong path. We have a design system that is already compiled to work in ie11 so core-js is defined in that package. That package is using 3.4.5 and in my app i use core-js 3.6.5 and obviously this is conflicting. So downgraded core-js and all now works. |
Ah, okay. Thanks for the clarification! 👍 |
@MMT-LD What package was it out of interest? How did you discover this was the cause? |
Uh oh!
There was an error while loading. Please reload this page.
So, i bundle may app using webpack and preset env for ie11 using corejs 3 and all works in all browsers absolutely fine, using browserstack. However, IE11 doesn't seem to work when i included the provider from redux-toolkit, however if i remove the
<Provider store={store}>
from the app and remove anything related, within the nested components, related to redux toolkit my app works in ie11. I have included a screenshot to help see the issue i'm facing.... Any help would much appreciated.Error details:
SCRIPT5022: Exception thrown and not caught

to-primitive.js (13,3)
The text was updated successfully, but these errors were encountered: