1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

React > IE11 > react-scripts ver2 でエラーになる件の対処

Posted at

概要

react-scriptsのバージョンを"1.1.5"→"2.1.1"
に変更したところIE11でエラー吐いて動かなかった件

↓IEでのエラー

SCRIPT438: オブジェクトは 'assign' プロパティまたはメソッドをサポートしていません。

SCRIPT5009: 'Promise' は定義されていません。

調査

Last call for Create React App v2 · Issue #5103 · facebook/create-react-app

ここ↑にIEのサポートやめましたと書いてありました。

We have dropped default support for Internet Explorer 9, 10, and 11.
Internet Explorer 9,10、および11の既定のサポートを削除しました。

対策

助け舟でこうも書いてありました。

If you still need to support these browsers, follow the instructions below.
これらのブラウザをサポートする必要がある場合は、以下の手順に従ってください

1, install react-app-polyfill:

$ npm install react-app-polyfill --save
$ # or
$ yarn add react-app-polyfill

2, src/index.js の先頭行に以下のどちらかを追加

src/index.js
import 'react-app-polyfill/ie9'; // For IE 9-11 support
# or
import 'react-app-polyfill/ie11'; // For IE 11 support

詳細

You can read more about these polyfills here.
さらに詳しくは以下を見てね

とのこと

create-react-app/packages/react-app-polyfill at master · facebook/create-react-app

1
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?