babel-plugin-transform-runtime weekly downloads statistics
By babel (204 listings) · npm · Babel plugins
Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
babel-plugin-transform-runtime has 162,693 recorded weekly downloads on npm, a decrease of 51.5% over the past 30 days.
It ranks #392 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -52.6%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
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).
and babel-runtime as a production dependency (with --save).
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:
Via CLI
Via Node API
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:
the following is generated:
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:
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:
into the following:
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
Usually babel will place helpers at the top of your file to do common tasks to avoid duplicating the code around in the current file. Sometimes these helpers can get a little bulky and add unnecessary duplication across files. The runtime transformer replaces all the helper calls to a module.
That means that the following code:
usually turns into:
the runtime transformer however turns this into:
Description from the npm listing.
- babel-plugin
Where babel-plugin-transform-runtime sits in the listing
Each band is one page of 20. Weekly downloads on a log 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.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
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.
Recent observations
Full history (121)Similar npm Babel plugins plugins
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 Oct 18, 2026. See the methodology.