You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create-react-app not working with IE11 in development mode #3034
One can manually add <script src="//cdn.polyfill.io/v2/polyfill.min.js"></script> to the index.html and that seems to fix the issue, but lit seems like this step shouldn't be necessary.
Hi, I'm facing this issue and I'm not sure If my version includes this fix.
I saw pointing out to v1.0.13 but when I do npm list -g, I get:
create-react-app@1.4.1
The only way I can overcome this, is by adding the script tag in the index.html pointing to the cdn service - which I really don't like this solution.
I tried importing 'core-js/es6' in the top of my index.js but when running, it stills complains about Object.assign() in the react-error-overlay/CodeBlock.js
As explained in the beginning of the user guide (which you should also see as README in the generated project), the version of create-react-app itself almost never matters.
The version that matters is the react-scripts version in your package.json. When we fix something, we release a react-scripts update, and you can use it by following the instructions I linked above.
@gaearon thank you I was using 1.0.12. I just updated my package.json and installed 1.0.13, so part of my problem is solved, still can't render in IE11.
Activity
gaearon commentedon Aug 31, 2017
Hmm. Would it make sense if we ran the polyfills first? I guess there's some minor chance they could throw, but not sure if that's a good tradeoff.
dcp12345678 commentedon Aug 31, 2017
One can manually add <script src="//cdn.polyfill.io/v2/polyfill.min.js"></script> to the index.html and that seems to fix the issue, but lit seems like this step shouldn't be necessary.
Timer commentedon Aug 31, 2017
@dcp12345678 it's only necessary for development; the application should work fine when built for production.
I believe the polyfills should be first in our entry point (or at least before the overlay), what edge cases are you talking about, @gaearon?
gaearon commentedon Aug 31, 2017
I guess let's just fix the code to use object spread? Babel will use its own helper for this.
Happy to take a PR fixing it.
[-]create-react-app not working with IE11[/-][+]create-react-app not working with IE11 in development mode[/+]tharakawj commentedon Sep 1, 2017
I'll send a PR.
tharakawj commentedon Sep 1, 2017
Apparently, we are already using object spread and Babel transform it to
Object.assign.https://github.com/facebookincubator/create-react-app/blob/v1.0.12/packages/react-error-overlay/src/components/CodeBlock.js#L24-L27
Can you think of any other workaround without changing execution order?
tharakawj commentedon Sep 1, 2017
It seems we need to disable
useBuiltInsoption to use Babel’sextends. https://github.com/facebookincubator/create-react-app/blob/master/packages/babel-preset-react-app/index.js#L20will it be a good workaround?
gaearon commentedon Sep 1, 2017
Oh I see. Well, let's just depend on
object-assignin that module and import it explicitly withimport assign from 'object-assign'.gaearon commentedon Sep 2, 2017
This should be fixed in 1.0.13. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.13
dcp12345678 commentedon Sep 3, 2017
I just verified it and the fix works great. Thanks so much @tharakawj and @Gearon!
taviroquai commentedon Oct 31, 2017
Hi, I'm facing this issue and I'm not sure If my version includes this fix.
I saw pointing out to v1.0.13 but when I do npm list -g, I get:
The only way I can overcome this, is by adding the script tag in the index.html pointing to the cdn service - which I really don't like this solution.
I tried importing 'core-js/es6' in the top of my index.js but when running, it stills complains about Object.assign() in the react-error-overlay/CodeBlock.js
Any hints are helpfull. Thanks.
gaearon commentedon Oct 31, 2017
As explained in the beginning of the user guide (which you should also see as
READMEin the generated project), the version ofcreate-react-appitself almost never matters.The version that matters is the
react-scriptsversion in yourpackage.json. When we fix something, we release areact-scriptsupdate, and you can use it by following the instructions I linked above.I hope this helps!
taviroquai commentedon Nov 1, 2017
@gaearon thank you I was using 1.0.12. I just updated my package.json and installed 1.0.13, so part of my problem is solved, still can't render in IE11.
gaearon commentedon Nov 1, 2017
Can you please update to the latest version (1.0.16)?
If you still have problems please file a new issue with a description, screenshot, etc.
Thanks!