create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Version 4.0.8: Internet Explorer no working anymore

Open Nasicus opened this issue 5 years ago • 2 comments

I recently tried out version 4.0.8. Mainly for the reason that SASS files are supported (i.e. you can directly import scss files in your tsx files).

It works pretty well in the good browsers.

However it looks like the support (polyfills I guess) for IE (11) is gone, because in IE I now get this error: Unhandled promise rejection ReferenceError: 'fetch' is undefined. (which is to be expected because fetch API isn't supported by IE out of the box).

When upgrading react-scripts-ts it also added a default browserslist to my package.json:

  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]

According to this list it's clear for me that IE 11 is not supported anymore.

So I tried to modify the list like this (or even remove it entirely), in the hope that it then will add more polyfills or whatsoever:

  "browserslist": [
    "defaults",
    "not dead",
    "not ie <= 10"
  ]

However the behavior is unchanged.

Now before I invest more time in this, I wanted to ask a simple question:

Will version >= 4.0.8 not support Internet Explorer anymore, is this a bug or simply my own mistake?

Nasicus avatar Nov 06 '18 06:11 Nasicus

Hi,

facing the same error with normal create-react-app (without typescript).

"browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 9",
    "not op_mini all"
  ]

Chaoste avatar Nov 12 '18 14:11 Chaoste

I think you now have to install a separate package for using polyfills:

https://facebook.github.io/create-react-app/docs/supported-browsers-features#supported-browsers https://www.npmjs.com/package/react-app-polyfill

Nasicus avatar Nov 14 '18 10:11 Nasicus