Registry / devops / rollup-plugin-babel-runtime-external

rollup-plugin-babel-runtime-external

JSON →
library2.0.0jsnpmunverified

Rollup plugin (v2.0.0, last released 2017, no recent updates) to automatically mark babel-runtime modules as external during bundling. Purpose: avoid duplicating babel helpers/polyfills when using @babel/runtime. Requires peer dependencies babel-runtime >=6.25.0 and rollup >=0.45.2. Differentiator: simplifies rollup config by auto-detecting babel-runtime imports vs manual external list.

npm install rollup-plugin-babel-runtime-external
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-BABE
R
rollup-plugin-babel-runtime-external
devopsjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external'
const babelRuntimeExternal = require('rollup-plugin-babel-runtime-external')
ESM only; CJS require not supported (package has no main field for CJS)
babelRuntimeExternal
import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external'
import { babelRuntimeExternal } from 'rollup-plugin-babel-runtime-external'
Default export only – named export does not exist
pluginOptions
babelRuntimeExternal({ helpers: true, polyfill: false, regenerator: true })
babelRuntimeExternal.helpers = false
Options are passed as object literal to the default function, not set on the result

Rollup configuration using the plugin to externalize babel-runtime modules with all options enabled.

// rollup.config.js import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'cjs' }, plugins: [ babelRuntimeExternal({ helpers: true, polyfill: true, regenerator: true }) ] };
Debug
Known issues
breakingRequires rollup >=0.45.2 and babel-runtime >=6.25.0
fix
Update rollup and babel-runtime to meet peer dependency versions.
affects: <2.0.0
deprecatedPackage is unmaintained since 2017; not compatible with rollup >=1.x or @babel/runtime (Babel 7).
fix
Migrate to native rollup external option or use @rollup/plugin-babel with externalHelpers.
affects: >=2.0.0
gotchaPlugin does not respect existing external option; both are additive.
fix
Manually list other external modules in the external option; plugin only handles babel-runtime.
affects: >=0.0.0
gotchaOptions helpers, polyfill, regenerator default to true; setting any to false excludes that subset of babel-runtime modules.
fix
Explicitly set false only for the specific module types you want to bundle.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'rollup-plugin-babel-runtime-external'
Package not installed or not in node_modules
fix
Run npm install --save-dev rollup-plugin-babel-runtime-external
Error: 'default' is not exported by rollup-plugin-babel-runtime-external
Using named import { babelRuntimeExternal } instead of default import
fix
Use import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external' (default export)
The 'babel-runtime' package is not marked as external
Plugin not added to rollup config's plugins array
fix
Add babelRuntimeExternal() to plugins array in rollup.config.js
RollupError: Could not resolve 'babel-runtime/helpers/extends'
Plugin not applied or options misconfigured
fix
Ensure plugin is included and options match your babel-runtime usage
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
babel-runtimerequiredpeer dependency – the runtime modules being externalized
rolluprequiredpeer dependency – core bundler plugin interface
Agent activity
8 hits · last 30 days
node
8
Resources
rollup-plugin-babel-runtime-external — npm install rollup-plugin-babel-runtime-external · libregistry