Package Exports
- react-app-polyfill/ie11
- react-app-polyfill/ie9
- react-app-polyfill/jsdom
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-app-polyfill) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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:
Promise
(forasync
/await
support)window.fetch
(a Promise-based way to make web requests in the browser)Object.assign
(a helper required for Object Spread, i.e.{ ...a, ...b }
)Symbol
(a built-in object used byfor...of
syntax and friends)Array.from
(a built-in static method used by array spread, i.e.[...arr]
)
If you need more features, you must include them manually.
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';
// ...