IE11 support doesn't work in dev mode, even after adding all polyfills and enabling ie11 support
See original GitHub issueDescribe the bug
IE11 support doesn’t work even after adding react-app-polyfill, enabling “ie 11” in browserslist in package.js and adding import ‘react-app-polyfill/ie11’ and import ‘react-app-polyfill/stable’ into src/index.js
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
followed instructions on https://create-react-app.dev/docs/supported-browsers-features/ and https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md
Environment
MacOS node 11.15.0 npm 6.7.0 latest create-react-app Virtual Box with Microsoft’s test Window10 and IE11 image VM
Steps to reproduce
- npx create-react-app test
- cd test
- npm i react-app-polyfill
- edit package.json and add “ie 11” into “browserslist->development” section:
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"ie 11",
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
- edit src/index.js and add 2 lines at the top:
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
- rm -rf node_modules/.cache
- npm run start
- launch IE11 VM and open http://`<ip>`:3000 in IE11
Expected behavior
test create react page is supposed to show up
Actual behavior
SCRIPT5022: SyntaxError 0.chunk.js (19856,1)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:43
- Comments:26 (1 by maintainers)
Top Results From Across the Web
React app not rendering in IE 11 even with polyfills
For the sake of testing, I created a dummy app using npx create-react-app and attempted to launch on IE 11/Edge. Installing 'react-app-polyfill' ...
Read more >How To Fix Your Angular App When It's Not Working in IE11
IE11 needs polyfills since it does not support ES2015 and later features. The polyfills.ts file, which is present in every Angular project, is...
Read more >Support older Microsoft browsers and Office versions
Learn how to support support older Microsoft browsers and Office versions in your add-in.
Read more >How to Support IE11 Users as You Move to Angular 13 - Bitovi
There are two ways you can support IE 11 with Angular 12 as you prepare to migrate to Angular 13: ... Or you...
Read more >Browser support - Angular
Enabling polyfills with CLI projectslink. The Angular CLI provides support for polyfills. If you are not using the CLI to create your projects,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
Just ran into this issue as well. Even 3.2.0 does not work for me. Have added polyfill, have added ie11 to browserlist in package.json. Syntax error is thrown at first fat arrow function.
I confirm the bug, just a small note that version
react-scripts@3.2.0
still works, so for a quick fix you can revert back (and deletenode_modules/.cache
and the browsers’ cache).