Skip to content

A webpack loader that generates a customized babel polyfill

License

Notifications You must be signed in to change notification settings

junyper/babel-polyfill-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A webpack loader that generates a customized babel polyfill

Resources

License

Stars

Watchers

Forks

Packages

No packages published