@computerrock/react-app-polyfill
This package provides polyfills for commonly used language features. It is based on Create React App
package.
Usage
Install package by running:
npm install @computerrock/react-app-polyfill
Polyfilling language features
You can polyfill stable language features not available in your target browsers:
import 'react-app-polyfill/stable';
Supporting Internet Explorer
These modules ensure the following language features are present:
Promise
(for async
/ 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 by for...of
syntax and friends)Array.from
(a built-in static method used by array spread, i.e. [...arr]
)
You can import the entry point for the minimal version you intend to support to ensure that
the minimum language features are present that are required:
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
or:
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';