Create-react-app: TypeError on IE 11: Object doesn't support property or method 'includes'

Created on 26 Jul 2017  路  3Comments  路  Source: facebook/create-react-app

Possible Unhandled Promise Rejection (id: 0):
  TypeError: Object doesn't support property or method 'includes'
  at Anonymous function (http://localhost:3000/static/js/bundle.js:62967:36566)

any missing polyfills for IE?

question

Most helpful comment

Thanks @Timer, actually it should be import 'core-js/es7/array';, which not been supported in IE11 for now.

All 3 comments

You must include polyfills required for your application yourself; we do not polyfill the environment.

See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#supported-language-features-and-polyfills.

You should install core-js and then in your index.js add:

import 'core-js/fn/string/includes';

Thanks @Timer, actually it should be import 'core-js/es7/array';, which not been supported in IE11 for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdamian3 picture rdamian3  路  3Comments

Aranir picture Aranir  路  3Comments

alleroux picture alleroux  路  3Comments

ap13p picture ap13p  路  3Comments

onelson picture onelson  路  3Comments