1.0.1 • Published 7 years ago

babel-polyfill-loader v1.0.1

Weekly downloads
39
License
MIT
Repository
github
Last release
7 years ago

npm

babel-polyfill-loader

A webpack loader that generates a customized babel polyfill

Installation

npm install babel-polyfill-loader

Usage

Add a babel-polyfill.json file to your project:

{
  "modules": [
    "es6.object.assign",
    "es6.array.find",
    "es6.array.find-index",
    "es6.array.from",
    "es6.string.starts-with",
    "es7.array.includes",
    "es6.symbol"
  ],
  "library": false
}

See the core-js README for more options.

Add an entry to your webpack config:

entry: {
  polyfill: 'babel-polyfill-loader!'
}

Or require the loader in your project:

require('babel-polyfill-loader!')

License

MIT