core-js-builder
TypeScript icon, indicating that this package has built-in type declarations

3.42.0 • Public • Published

logo

fundraising PRs welcome version

I highly recommend reading this: So, what's next?

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 and build for targets. modules, exclude and targets options are specified in the core-js-compat format.

import builder from 'core-js-builder';

const bundle = await builder({
  // entry / module / namespace / an array of them, by default - all `core-js` modules
  modules: ['core-js/actual', /^esnext\.reflect\./],
  // a blacklist of entries / modules / namespaces, by default - empty list
  exclude: [/^es\.math\./, 'es.number.constructor'],
  // optional browserslist or core-js-compat format query
  targets: '> 0.5%, not dead, ie 9-11',
  // shows summary for the bundle, disabled by default
  summary: {
    // in the console, you could specify required parts or set `true` for enable all of them
    console: { size: true, modules: false },
    // in the comment in the target file, similarly to `summary.console`
    comment: { size: false, modules: true },
  },
  // output format, 'bundle' by default, can be 'cjs' or 'esm', and in this case
  // the result will not be bundled and will contain imports of required modules
  format: 'bundle',
  // optional target filename, if it's missed a file will not be created
  filename: PATH_TO_MY_COREJS_BUNDLE,
});

ℹ️ When using TypeScript, make sure to set esModuleInterop to true.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.0-beta.200beta
3.0.0-alpha.40alpha
3.42.0111latest

Version History

VersionDownloads (Last 7 Days)Published
3.42.0111
3.41.06
3.40.0168
3.39.01,292
3.38.1648
3.38.02
3.37.137
3.37.00
3.36.11
3.36.01
3.35.14,550
3.35.00
3.34.01
3.33.34
3.33.20
3.33.16
3.33.02
3.32.21,410
3.32.10
3.32.00
3.31.11
3.31.03,015
3.30.27
3.30.166
3.30.01
3.29.10
3.29.00
3.28.00
3.27.22
3.27.10
3.27.00
3.26.13
3.26.00
3.25.50
3.25.40
3.25.30
3.25.20
3.25.10
3.25.00
3.24.11
3.24.00
3.23.50
3.23.40
3.23.30
3.23.20
3.23.10
3.23.02
3.22.80
3.22.70
3.22.60
3.22.50
3.22.40
3.22.30
3.22.20
3.22.10
3.22.00
3.21.10
3.21.035
3.20.30
3.20.20
3.20.10
3.20.00
3.19.30
3.19.20
3.19.13,172
3.19.00
3.18.30
3.18.20
3.18.10
3.18.00
3.17.30
3.17.20
3.17.10
3.17.00
3.16.40
3.16.30
3.16.21
3.16.10
3.16.00
3.15.20
3.15.10
3.15.00
3.14.01,265
3.13.10
3.13.00
3.12.10
3.12.01
3.11.30
3.11.20
3.11.10
3.11.0207
3.10.20
3.10.10
3.10.00
3.9.10
3.9.00
3.8.34
3.8.21
3.8.12
3.8.00
2.6.1239
3.7.00
3.6.5414
3.6.4699
3.6.30
3.6.20
3.6.10
3.6.00
3.5.00
3.4.8510
2.6.11117
3.4.70
3.4.50
3.4.40
3.4.30
3.4.20
3.4.10
3.4.00
3.3.60
3.3.50
3.3.40
3.3.30
3.3.20
3.3.10
2.6.100
3.2.14
3.2.00
3.1.40
3.1.30
2.6.91
3.1.20
2.6.80
3.1.10
2.6.70
3.1.00
2.6.60
3.0.10
3.0.00
3.0.0-beta.200
3.0.0-beta.190
3.0.0-beta.180
3.0.0-beta.170
3.0.0-beta.160
2.6.52
3.0.0-beta.150
2.6.40
3.0.0-beta.140
3.0.0-beta.130
3.0.0-beta.120
3.0.0-beta.110
2.6.33
3.0.0-beta.100
3.0.0-beta.90
3.0.0-beta.80
2.6.20
3.0.0-beta.70
3.0.0-beta.60
2.6.10
3.0.0-beta.50
2.6.01
3.0.0-beta.40
3.0.0-beta.30
3.0.0-beta.20
2.5.7278
3.0.0-beta.10
2.5.60
2.5.50
3.0.0-alpha.40
3.0.0-alpha.30
3.0.0-alpha.20
2.5.40
3.0.0-alpha.10
2.5.325
2.5.20
2.5.10
2.5.01
2.4.1726
2.4.01
2.3.00
2.2.20
2.2.10
2.2.00
2.1.50
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.30
2.0.20
2.0.10
2.0.00
2.0.0-beta.20

Package Sidebar

Install

npm i core-js-builder

Weekly Downloads

18,846

Version

3.42.0

License

MIT

Unpacked Size

9.12 kB

Total Files

6

Last publish

Collaborators

  • zloirock