npm

Need private packages and team management tools?Check out npm Orgs. »

core-js-builder

3.1.4 • 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

3,326

version

3.1.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability