6 Star 15 Fork 4

Gitee 极速下载/core-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
deno/corejs
docs
packages
core-js-builder
.npmignore
README.md
config.js
index.d.ts
index.js
package.json
core-js-bundle
core-js-compat
core-js-pure
core-js
scripts
tests
.gitattributes
.gitignore
.npmrc
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
SECURITY.md
babel.config.js
package-lock.json
package.json
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/zloirock/core-js
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/core-js.git
git@gitee.com:mirrors/core-js.git
mirrors
core-js
core-js
master

搜索帮助