Skip to content

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

Open
@ttaranov

Description

@ttaranov

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions