{"id":20525,"library":"rollup-plugin-babel-runtime-external","title":"rollup-plugin-babel-runtime-external","description":"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.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/stevenbenisek/rollup-plugin-babel-runtime-external","tags":["javascript","rollup","plugin","external","auto","babel-runtime"],"install":[{"cmd":"npm install rollup-plugin-babel-runtime-external","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-babel-runtime-external","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-babel-runtime-external","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency – the runtime modules being externalized","package":"babel-runtime","optional":false},{"reason":"peer dependency – core bundler plugin interface","package":"rollup","optional":false}],"imports":[{"note":"ESM only; CJS require not supported (package has no main field for CJS)","wrong":"const babelRuntimeExternal = require('rollup-plugin-babel-runtime-external')","symbol":"default","correct":"import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external'"},{"note":"Default export only – named export does not exist","wrong":"import { babelRuntimeExternal } from 'rollup-plugin-babel-runtime-external'","symbol":"babelRuntimeExternal","correct":"import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external'"},{"note":"Options are passed as object literal to the default function, not set on the result","wrong":"babelRuntimeExternal.helpers = false","symbol":"pluginOptions","correct":"babelRuntimeExternal({ helpers: true, polyfill: false, regenerator: true })"}],"quickstart":{"code":"// rollup.config.js\nimport babelRuntimeExternal from 'rollup-plugin-babel-runtime-external';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'cjs'\n  },\n  plugins: [\n    babelRuntimeExternal({\n      helpers: true,\n      polyfill: true,\n      regenerator: true\n    })\n  ]\n};","lang":"javascript","description":"Rollup configuration using the plugin to externalize babel-runtime modules with all options enabled."},"warnings":[{"fix":"Update rollup and babel-runtime to meet peer dependency versions.","message":"Requires rollup >=0.45.2 and babel-runtime >=6.25.0","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Migrate to native rollup external option or use @rollup/plugin-babel with externalHelpers.","message":"Package is unmaintained since 2017; not compatible with rollup >=1.x or @babel/runtime (Babel 7).","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Manually list other external modules in the external option; plugin only handles babel-runtime.","message":"Plugin does not respect existing external option; both are additive.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Explicitly set false only for the specific module types you want to bundle.","message":"Options helpers, polyfill, regenerator default to true; setting any to false excludes that subset of babel-runtime modules.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev rollup-plugin-babel-runtime-external","cause":"Package not installed or not in node_modules","error":"Cannot find module 'rollup-plugin-babel-runtime-external'"},{"fix":"Use import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external' (default export)","cause":"Using named import { babelRuntimeExternal } instead of default import","error":"Error: 'default' is not exported by rollup-plugin-babel-runtime-external"},{"fix":"Add babelRuntimeExternal() to plugins array in rollup.config.js","cause":"Plugin not added to rollup config's plugins array","error":"The 'babel-runtime' package is not marked as external"},{"fix":"Ensure plugin is included and options match your babel-runtime usage","cause":"Plugin not applied or options misconfigured","error":"RollupError: Could not resolve 'babel-runtime/helpers/extends'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}