Skip to main content
core-js publishes three packages to npm. Install whichever matches your use case.

core-js

The global polyfill. Installs missing features directly onto built-in globals (Promise, Array.prototype, Set, etc.). Use this in applications.
npm install --save [email protected]

core-js-pure

The pollution-free ponyfill. Exports polyfill implementations as named modules without modifying any globals. Use this in libraries or any context where you must not alter the host environment.
npm install --save [email protected]

core-js-bundle

A pre-built, minified bundle of the global polyfill. No build step is required — include it via a <script> tag or serve it from a CDN.
npm install --save [email protected]

Postinstall message

After installation, core-js prints a funding message asking users to support the project. If this interferes with your CI output or install scripts, you can suppress it in several ways:
ADBLOCK=true npm install

Pinning the minor version for Babel and swc

When using @babel/preset-env or swc with the useBuiltIns / usage option, you must set the corejs configuration option to the full minor version string, not just the major version number.
babel.config.json
{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "usage",
        "corejs": "3.49"
      }
    ]
  ]
}
.swcrc
{
  "env": {
    "targets": "> 0.25%, not dead",
    "mode": "usage",
    "coreJs": "3.49"
  }
}
Specifying corejs: 3 instead of corejs: '3.49' causes Babel and swc to skip polyfills that were added in minor releases of core-js. Always pin to the minor version that matches the package you have installed.

Choosing the right package

ScenarioPackage
Application that targets multiple browserscore-js
npm library that must not modify globalscore-js-pure
Direct <script> tag without a bundlercore-js-bundle
Babel or swc with automatic polyfill injectioncore-js
@babel/runtime for automatic transformscore-js-pure (managed by Babel)

Next steps

Once installed, head to the Quick Start to see how to import and use core-js in your project.

Build docs developers (and LLMs) love