npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

core-js-builder

3.2.1 • Public • Published

For some cases could be useful adding a blacklist of features or generation a polyfill for target engines. This API helps conditionally include or exclude certain parts of core-js, use browserslist queries from core-js-compat package.

require('core-js-builder')({
  modules: ['es', 'esnext.reflect', 'web'],        // modules / namespaces, by default - all `core-js` modules
  blacklist: ['es.math', 'es.number.constructor'], // blacklist of modules / namespaces, by default - empty list
  targets: '> 0.5%',                               // optional browserslist query
  filename: './my-core-js-bundle.js',              // optional target filename, if it's missed a file will not be created
}).then(code => {                                  // code of result polyfill
  // ...
}).catch(error => {
  // ...
});

Keywords

none

install

npm i core-js-builder

Downloadsweekly downloads

4,100

version

3.2.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability