Skip to main content
core-js-bundle is a pre-built distribution of core-js/actual. It is a single file you can load directly in a browser or Node.js environment without any build tooling.

Installation

npm install --save [email protected]

Usage

Script tag (browser)

<script src="node_modules/core-js-bundle/minified.js"></script>
Or load it from a CDN:
<script src="https://unpkg.com/[email protected]/minified.js"></script>

CommonJS (Node.js / legacy bundlers)

require('core-js-bundle');

Verify what’s included

core-js-bundle is equivalent to importing core-js/actual:
// These two are equivalent in terms of what gets polyfilled:
import 'core-js/actual';     // if you're using core-js directly with a bundler
require('core-js-bundle');   // pre-built, no bundler needed

What it includes

core-js-bundle ships the core-js/actual namespace, which covers:
  • All stable ECMAScript features (ES5 through the latest ratified spec)
  • Web platform standards polyfilled by core-js (e.g., structuredClone, queueMicrotask, URL)
  • Stage 3+ ECMAScript proposals that are actively progressing toward standardisation
It does not include early-stage proposals (stage 0–2). For those, you would need to build a custom bundle using core-js-builder.

Files in the package

FileDescription
index.jsUnminified bundle with source comments
minified.jsMinified bundle for production use
minified.js.mapSource map for the minified bundle

core-js-bundle vs core-js

core-jscore-js-bundle
Requires a bundlerYes (Webpack, Rollup, etc.)No
Tree-shakeableYes (import specific modules)No (entire actual namespace)
Use with <script> tagNoYes
Custom feature selectionYesNo — use core-js-builder
Recommended forModern build pipelinesCDN, legacy projects, quick prototyping
If you have a build pipeline (Webpack, Vite, Rollup, etc.), use core-js directly. It enables tree-shaking, auto-injection with Babel/swc, and lets you import only what you need. core-js-bundle is aimed at environments where a build step is not practical.

When to use core-js-bundle

CDN delivery

Serve a polyfill file from a CDN without needing to run a build. Works with unpkg, jsDelivr, or a self-hosted CDN.

Legacy projects without bundlers

Projects using plain <script> tags or older tooling that cannot process node_modules directly.

Quick prototyping

Spin up a prototype or demo page that needs modern JS features without setting up a build pipeline.

Server-rendered pages

Inject a polyfill script into the <head> of a server-rendered HTML page before any application JavaScript runs.
core-js-bundle loads the entire core-js/actual namespace unconditionally. In a modern build pipeline this is wasteful — use core-js with @babel/preset-env or swc to include only the polyfills your targets actually need.

Custom bundles

If you need a pre-built bundle that is smaller than core-js/actual — for example, scoped to specific features or filtered by target browsers — use core-js-builder to generate it.
import builder from 'core-js-builder';

await builder({
  modules: ['core-js/actual'],
  targets: '> 0.5%, not dead',
  filename: './polyfills.js',
});

Build docs developers (and LLMs) love