question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11 support doesn't work in dev mode, even after adding all polyfills and enabling ie11 support

See original GitHub issue

Describe 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

  1. npx create-react-app test
  2. cd test
  3. npm i react-app-polyfill
  4. 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"
    ]
  }
  1. edit src/index.js and add 2 lines at the top:
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
  1. rm -rf node_modules/.cache
  2. npm run start
  3. 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:open
  • Created 4 years ago
  • Reactions:43
  • Comments:26 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
fgeorgssoncommented, Mar 11, 2020

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.

14reactions
eyereancommented, Dec 18, 2019

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 delete node_modules/.cache and the browsers’ cache).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found