Syntax error - IE10 - Polyfill - Development Mode
See original GitHub issueIs this a bug report?
Yes
Did you try recovering your dependencies?
No, it’s a fresh project.
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
Environment Info:
System: OS: Windows 10 CPU: (8) x64 Intel® Core™ i7-2600K CPU @ 3.40GHz Binaries: Node: 10.15.3 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 42.17134.1.0 Internet Explorer: 11.0.17134.1 npmPackages: react: ^16.8.6 => 16.8.6 react-dom: ^16.8.6 => 16.8.6 react-scripts: 3.0.0 => 3.0.0 npmGlobalPackages: create-react-app: Not Found
Steps to Reproduce
(Write your steps here:)
- Create a new project with npx create-react-app my-app
- I need ie10 compatibility so do: npm install react-app-polyfill
- Include these 2 lines at the top in index.js: import ‘react-app-polyfill/ie9’; import ‘react-app-polyfill/stable’;
- Add “ie 10” to browserslist both for production and development
- Save + npm start.
Expected Behavior
I would see the react svg logo and the default text and background color in IE10, with no script error in IE’s dev tools console.
Actual Behavior
IE displays a blank white page with some Javascript errors in the console (attached screenshot). A “Map is undefined” error appear in ansi-colors index.js node_modules. I follow all the steps of #6924 but it doesn’t work for ie10.
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Ah i think i figured out what’s happengin @amerej. The error overlay unfortunately doesn’t work in browsers older than ie 11 currently it appears. The error overlay code loads before your application code, so your attempts to polyfill won’t work. This is a known issue. I’m going to close this in favor of the existing issue.
By the way, just a heads up that our default production
browserslist
includesnot dead
, which will excludeie 10
if you were to add it beforenot dead
in the list. You can see what i mean here: https://browserl.ist/?q=ie+9%2C+ie+10%2C+ie+11%2C+not+dead. Adding it after should work as expected though: https://browserl.ist/?q=ie+9%2C+ie+11%2C+not+dead%2C+ie+10@ianschmitz it works!, Thank you.