Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

core-js-builder

Package Overview
Dependencies
Maintainers
2
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-js-builder

core-js builder

  • 3.17.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
decreased by-43.09%
Maintainers
2
Weekly downloads
 
Created
Source

For some cases could be useful to exclude some core-js features or generate a polyfill for target engines. This API helps conditionally include or exclude certain parts of core-js, build for targets specified in core-js-compat format.

const builder = require('core-js-builder');

const bundle = await builder({
  modules: ['es', 'esnext.reflect', 'web'],      // modules / namespaces, by default - all `core-js` modules
  exclude: ['es.math', 'es.number.constructor'], // a blacklist of modules / namespaces, by default - empty list
  targets: '> 0.5%, not dead, ie 9-11',          // optional browserslist or core-js-compat format query
  summary: {                                     // shows summary for the bundle, disabled by default:
    console: { size: true, modules: false },     // in the console, you could specify required parts or set `true` for enable all of them
    comment: { size: false, modules: true },     // in the comment in the target file, similarly to `summary.console`
  },
  filename: './my-core-js-bundle.js',            // optional target filename, if it's missed a file will not be created
});

FAQs

Package last updated on 02 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc