Switch branches/tags
Find file History
Timer Publish
 - babel-plugin-named-asset-import@0.2.2
 - babel-preset-react-app@5.0.2
 - confusing-browser-globals@1.0.3
 - create-react-app@2.0.2
 - eslint-config-react-app@3.0.3
 - react-app-polyfill@0.1.3
 - react-dev-utils@6.0.3
 - react-error-overlay@5.0.3
 - react-scripts@2.0.3
Latest commit 209053b Oct 2, 2018

README.md

react-app-polyfill

This package includes polyfills for various browsers. It includes minimum requirements and commonly used language features used by Create React App projects.

Features

Each polyfill ensures the following language features are present:

  1. Promise (for async / await support)
  2. window.fetch (a Promise-based way to make web requests in the browser)
  3. Object.assign (a helper required for Object Spread, i.e. { ...a, ...b })
  4. Symbol (a built-in object used by for...of syntax and friends)
  5. Array.from (a built-in static method used by array spread, i.e. [...arr])

Usage

First, install the package using Yarn or npm:

npm install react-app-polyfill

or

yarn add react-app-polyfill

Now, you can import the entry point for the minimal version you intend to support. For example, if you import the IE9 entry point, this will include IE10 and IE11 support.

Internet Explorer 9

// This must be the first line in src/index.js
import 'react-app-polyfill/ie9';

// ...

Internet Explorer 11

// This must be the first line in src/index.js
import 'react-app-polyfill/ie11';

// ...