babel-plugin-polyfill-es-shims
Install
Using npm:
npm install --save-dev babel-plugin-polyfill-es-shims
or using yarn:
yarn add babel-plugin-polyfill-es-shims --dev
Usage
Add this plugin to your Babel configuration:
{
"plugins": [["polyfill-es-shims", { "method": "usage-pure" }]]
}
This package supports the usage-pure
and usage-global
methods.
Supported polyfills
This polyfill provider is compatible with polyfills that follow the es-shims-api
specification. Those polyfills must live under the @es-shims
organization, but for historical reasons some of them are owned by different people: they are explicitly marked as such in the following tables.
ES2024
ES2023
ES2022
ES2021
ES2020
ES2019
ES2018
ES2017
ES2016
Builtin object or function | Package name | Owner |
---|
Array.prototype.includes | array-includes | |
ES2015 (ES6)
⚠️ This provider fully supports ES2016+ polyfills, but we are still working on ES5 and ES6 support. You can find the list of missing polyfills at missing-polyfills.md
.
ES5
⚠️ This provider fully supports ES2016+ polyfills, but we are still working on ES5 and ES6 support. You can find the list of missing polyfills at missing-polyfills.md
.