Support developing in IE 9
See original GitHub issueI have created a new reactjs project using create-react-app
and am finding it’s not working on IE10 & IE9. I have done a lot of research and it led me to using polyfills, which I have done with many of my other Rails on React app, but I’m finding it not working with this project created via create-react-app
.
Here’s the error:
SCRIPT5009: 'Map' is undefined
I notice this error is related to ES6’s new Map() function.
So, here’s what I’ve done in my code in an attempt to make it work:
import './polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
import 'bootstrap/dist/css/bootstrap.min.css';
const app = (
<BrowserRouter basename={process.env.PUBLIC_URL}>
<App />
</BrowserRouter>
);
ReactDOM.render(app, document.getElementById('root'));
Polyfill.js:
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/fn/object/assign';
This isn’t working. I’m not sure what else to try. I’ve tried a lot of other polyfill imports as well and continue to get the same error.
Any help would be appreciated!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:12 (2 by maintainers)
Top Results From Across the Web
CSS3 Support in Internet Explorer 9 - Impressive Webs
I've created a few charts showing CSS3 support in IE9 Beta. The list does not include every conceivable CSS3 property or selector.
Read more >Search results for 'Internet+Explorer+9' - Office.com
Internet Explorer 9 or Internet Explorer 8 on Windows 7 or on Windows Vista SP2. Start Registry Editor. Locate and then select the...
Read more >Why You Should Stop Supporting IE10, IE9 and IE8 - Xfive
Once you stop worrying about legacy IE versions, your web development will be easier and more cost effective. Differences in supported features between...
Read more >Internet Explorer 9 - Wikipedia
Internet Explorer 9 supports ECMAScript 5 (ES5), several CSS 3 properties and embedded ICC v2 or v4 color profiles support via Windows Color...
Read more >IE9 & IE10 Support - Benefitfocus
As of January 12, 2016, Microsoft no longer supports Internet Explorer 8 (IE8), Internet Explorer 9 (IE9) or Internet Explorer (IE10), stating that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ivoborisov I have also got sucked into this problem recently, and I can’t wait the release of 3.0 to develop in IE 9, so I spent hours to fix it locally.
This problem is caused by
react-dev-utils/webpackHotDevClient
provided by CRA to bring better user experience. The customwebpackHotDevClient
introducedchalk
module accidentally which in turn have a dependency ofansi-style
module, and the final module used es6 Map feature which sucks in IE 9. Unfortunately,webpackHotDevClient
is loaded prior to the polyfilled app code, so IE 9 complaines that ‘Map’ is undefined.Fix: Eject CRA locally and then locate the entry config in
config/webpack.config.dev.js
.react-dev-utils/webpackHotDevClient
(chalk seems unnessesary)It is a known limitation that the dev server does not support IE9/11. We’re working on adding this.