category: packages
babel-polyfill-loader
[![build-status][build-status]][build-status-url]
A webpack loader that generates a customized polyfill
Installation
yarn add --dev @instructure/ui-polyfill-loader
Usage
Add a .polyfillrc (in JSON or YAML format) or a polyfill.config.js file to your project:
{
[
"es6.object.assign",
"es6.array.find",
"es6.array.find-index",
"es6.array.from",
"es6.string.starts-with",
"es7.array.includes",
"es6.symbol"
]
}
See the core-js README for more options.
Add an entry to your webpack config:
entry: {
polyfill: '@instructure/ui-polyfill-loader!'
}
Or require the loader in your project:
require('@instructure/ui-polyfill-loader!')