Get unlimited public & private packages + team-based management with npm Teams.Learn more »

core-js-builder

3.6.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

2,040

Version

3.6.4

License

MIT

Unpacked Size

4.85 kB

Total Files

5

Last publish

Collaborators

  • avatar