Skip to content
PluginStats

babel-plugin-transform-runtime weekly downloads statistics

By babel (206 listings) · npm · Babel plugins

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

View on npm Fresh · Dec 6, 2026

babel-plugin-transform-runtime has 322,415 recorded weekly downloads on npm, a decrease of 9.9% over the past 30 days, ranking #454 of 3,247 tracked listings.

Weekly downloads
322,415
Official API · Dec 5, 2026
7-day growth
-6.6%
-22.8K weekly downloads
30-day growth
-9.9%
-35.4K weekly downloads
90-day growth
-7.3%
-25.3K weekly downloads
Rank
#454
▼ 20 in 7 days

About babel-plugin-transform-runtime

babel-plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals. (This plugin is recommended in a library/tool)

NOTE: Instance methods such as "foobar".includes("foo") will not work since that would require modification of existing builtins (Use babel-polyfill for that).

Why?

Babel uses very small helpers for common functions such as _extend. By default this will be added to every file that requires it. This duplication is sometimes unnecessary, especially when your application is spread out over multiple files.

This is where the transform-runtime plugin comes in: all of the helpers will reference the module babel-runtime to avoid duplication across your compiled output. The runtime will be compiled into your build.

Another purpose of this transformer is to create a sandboxed environment for your code. If you use babel-polyfill and the built-ins it provides such as Promise, Set and Map, those will pollute the global scope. While this might be ok for an app or a command line tool, it becomes a problem if your code is a library which you intend to publish for others to use or if you can't exactly control the environment in which your code will run.

The transformer will alias these built-ins to core-js so you can use them seamlessly without having to require the polyfill.

See the technical details section for more information on how this works and the types of transformations that occur.

Installation

NOTE - Production vs. development dependencies

In most cases, you should install babel-plugin-transform-runtime as a development dependency (with --save-dev).

npm install --save-dev babel-plugin-transform-runtime

and babel-runtime as a production dependency (with --save).

npm install --save babel-runtime

The transformation plugin is typically used only in development, but the runtime itself will be depended on by your deployed/published code. See the examples below for more details.

Usage

Via .babelrc (Recommended)

Add the following line to your .babelrc file:

// without options
{
  "plugins": ["transform-runtime"]
}

// with options
{
  "plugins": [
    ["transform-runtime", {
      "helpers": false, // defaults to true
      "polyfill": false, // defaults to true
      "regenerator": true, // defaults to true
      "moduleName": "babel-runtime" // defaults to "babel-runtime"
    }]
  ]
}
Via CLI
babel --plugins transform-runtime script.js
Via Node API
require("babel-core").transform("code", {
  plugins: ["transform-runtime"]
});

Technical details

The runtime transformer plugin does three things:

  • Automatically requires babel-runtime/regenerator when you use generators/async functions.
  • Automatically requires babel-runtime/core-js and maps ES6 static methods and built-ins.
  • Removes the inline babel helpers and uses the module babel-runtime/helpers instead.

What does this actually mean though? Basically, you can use built-ins such as Promise, Set, Symbol etc as well use all the Babel features that require a polyfill seamlessly, without global pollution, making it extremely suitable for libraries.

Make sure you include babel-runtime as a dependency.

Regenerator aliasing

Whenever you use a generator function or async function:

function* foo() {

}

the following is generated:

"use strict";

var _marked = [foo].map(regeneratorRuntime.mark);

function foo() {
  return regeneratorRuntime.wrap(function foo$(_context) {
    while (1) switch (_context.prev = _context.next) {
      case 0:
      case "end":
        return _context.stop();
    }
  }, _marked[0], this);
}

This isn't ideal as then you have to include the regenerator runtime which pollutes the global scope.

Instead what the runtime transformer does it compile that to:

"use strict";

var _regenerator = require("babel-runtime/regenerator");

var _regenerator2 = _interopRequireDefault(_regenerator);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _marked = [foo].map(_regenerator2.default.mark);

function foo() {
  return regeneratorRuntime.wrap(function foo$(_context) {
    while (1) switch (_context.prev = _context.next) {
      case 0:
      case "end":
        return _context.stop();
    }
  }, _marked[0], this);
}

This means that you can use the regenerator runtime without polluting your current environment.

core-js aliasing

Sometimes you may want to use new built-ins such as Map, Set, Promise etc. Your only way to use these is usually to include a globally polluting polyfill.

What the runtime transformer does is transform the following:

var sym = Symbol();

var promise = new Promise;

console.log(arr[Symbol.iterator]());

into the following:

"use strict";

var _getIterator2 = require("babel-runtime/core-js/get-iterator");

var _getIterator3 = _interopRequireDefault(_getIterator2);

var _promise = require("babel-runtime/core-js/promise");

var _promise2 = _interopRequireDefault(_promise);

var _symbol = require("babel-runtime/core-js/symbol");

var _symbol2 = _interopRequireDefault(_symbol);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var sym = (0, _symbol2.default)();

var promise = new _promise2.default();

console.log((0, _getIterator3.default)(arr));

This means is that you can seamlessly use these native built-ins and static methods without worrying about where they come from.

NOTE: Instance methods such as "foobar".includes("foo") will not work.

Helper aliasing…

Description from the npm listing.

  • babel-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

babel-plugin-transform-runtime weekly downloads on npm, last 90 days: 322,415 weekly downloads as of Dec 5, 2026, -7.3% over 90 days.babel-plugin-transform-runtimeWeekly downloads on npm · Last 90 days322,415downloads / week-7.3% over 90 days0100K200K300K400K500K600K700K800KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
babel-plugin-transform-runtime weekly downloads on npm, last 90 days: 322,415 weekly downloads as of Dec 5, 2026, -7.3% over 90 days.

7/30/90-day growth

babel-plugin-transform-runtime weekly downloads growth on npm: -6.6% over 7 days, -9.9% over 30 days, -7.3% over 90 days.babel-plugin-transform-runtimeWeekly downloads growth on npm322,415downloads / week now7-day growth-22,778 weekly downloads-6.6%30-day growth-35,416 weekly downloads-9.9%90-day growth-25,349 weekly downloads-7.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
babel-plugin-transform-runtime weekly downloads growth on npm: -6.6% over 7 days, -9.9% over 30 days, -7.3% over 90 days.

Ranking history

babel-plugin-transform-runtime npm ranking history: currently #454 (by weekly downloads).babel-plugin-transform-runtimenpm ranking · by weekly downloads · Last 90 days#454current rank#390#400#410#420#430#440#450#460Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
babel-plugin-transform-runtime npm ranking history: currently #454 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 23, #14 (overall #454)
All npm: every listing in weekly downloads order

Listing placement

Babel plugins263 listings · 14 pages · page 11, #8 (overall #208)
Babel plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for babel-plugin-transform-runtime
Date (UTC)Weekly downloadsChange vs. previous
322,415-1.2K
323,587-196
323,783+4.5K
319,236-3.8K
323,030+4.1K
318,941-17.3K
336,285-8.9K
345,193-8.9K
354,140-2.3K
356,403-8.5K
364,895-7.4K
372,266-5.2K
377,471+15.5K
361,961—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/babel-plugin-transform-runtime. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.