babel-plugin-polyfill-corejs3
A Babel plugin to inject imports to core-js@3 polyfills
Last updated a year ago by nicolo-ribaudo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install babel-plugin-polyfill-corejs3 
SYNC missed versions from official npm registry.

babel-plugin-polyfill-corejs3

Install

Using npm:

npm install --save-dev babel-plugin-polyfill-corejs3

or using yarn:

yarn add babel-plugin-polyfill-corejs3 --dev

Usage

Add this plugin to your Babel configuration:

{
  "plugins": [["polyfill-corejs3", { "method": "usage-global", "version": "3.20" }]]
}

This package supports the usage-pure, usage-global, and entry-global methods. When entry-global is used, it replaces imports to core-js.

Options

See here for a list of options supported by every polyfill provider.

version

string, defaults to "3.0".

This option only has an effect when used alongside "method": "usage-global" or "method": "usage-pure". It is recommended to specify the minor version you are using as core-js@3.0 may not include polyfills for the latest features. If you are bundling an app, you can provide the version directly from your node modules:

{
  plugins: [
    ["polyfill-corejs3", {
      "method": "usage-pure",
      // use `core-js/package.json` if you are using `usage-global`
      "version": require("core-js-pure/package.json").version
    }]
  ]
}

If you are a library author, specify a reasonably modern core-js version in your package.json and provide the plugin the minimal supported version.

{
  "dependencies": {
    "core-js": "^3.20.0"
  }
}
{
  plugins: [
    ["polyfill-corejs3", {
      "method": "usage-global",
      // improvise if you have more complicated version spec, e.g. > 3.1.4
      "version": require("./package.json").dependencies["core-js"]
    }]
  ]
}

proposals

boolean, defaults to false.

This option only has an effect when used alongside "method": "usage-global" or "method": "usage-pure". When proposals are true, any ES proposal supported by core-js will be polyfilled as well.

Current Tags

  • 0.9.0                                ...           latest (9 months ago)

42 Versions

  • 0.9.0                                ...           9 months ago
  • 0.8.7                                ...           10 months ago
  • 0.8.6                                ...           a year ago
  • 0.8.5                                ...           a year ago
  • 0.8.4                                ...           a year ago
  • 0.8.3                                ...           a year ago
  • 0.8.2                                ...           a year ago
  • 0.8.1                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
  • 0.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |