babel/babel · error · Error
The 'useBuiltIns' option has been removed. Use the 'corejs'o
Error message
The 'useBuiltIns' option has been removed. Use the 'corejs'option to polyfill with `core-js` via @babel/runtime.
What it means
Thrown by @babel/plugin-transform-runtime when the deprecated 'useBuiltIns' option key is present AND its value is falsy (false, 0, null, etc.). The message differs from error 236 because a falsy useBuiltIns meant the user wanted to avoid using builtins — which is no longer possible without core-js. The error directs the user to the 'corejs' option for polyfilling. The branch is at line 50.
Source
Thrown at packages/babel-plugin-transform-runtime/src/index.ts:50
}
if (typeof runtimeVersion !== "string") {
throw new Error(`The 'version' option must be a version string.`);
}
if (moduleName !== null && typeof moduleName !== "string") {
throw new Error("The 'moduleName' option must be null or a string.");
}
if (Object.hasOwn(options, "useBuiltIns")) {
// @ts-expect-error deprecated options
if (options.useBuiltIns) {
throw new Error(
"The 'useBuiltIns' option has been removed. The @babel/runtime " +
"module now uses builtins by default.",
);
} else {
throw new Error(
"The 'useBuiltIns' option has been removed. Use the 'corejs'" +
"option to polyfill with `core-js` via @babel/runtime.",
);
}
}
if (Object.hasOwn(options, "polyfill")) {
// @ts-expect-error deprecated options
if (options.polyfill === false) {
throw new Error(
"The 'polyfill' option has been removed. The @babel/runtime " +
"module now skips polyfilling by default.",
);
} else {
throw new Error(
"The 'polyfill' option has been removed. Use the 'corejs'" +
"option to polyfill with `core-js` via @babel/runtime.",
);View on GitHub (pinned to 06b6eae39d)
Solutions
- Remove the 'useBuiltIns' key and use the 'corejs' option instead if you need core-js polyfills: corejs: { version: 3 }.
- If you do not need polyfilling, simply remove the key — Babel 8 skips polyfilling by default.
Example fix
// before
["@babel/plugin-transform-runtime", { "useBuiltIns": false }]
// after
["@babel/plugin-transform-runtime", { "corejs": { "version": 3 } }] Defensive patterns
Strategy: validation
Validate before calling
if (Object.hasOwn(config, "useBuiltIns") && !config.useBuiltIns) {
delete config.useBuiltIns;
if (!config.corejs) config.corejs = { version: 3 };
console.warn("Migrated useBuiltIns:false to corejs:{version:3} for transform-runtime");
} Prevention
- If you relied on useBuiltIns:false for helper-only mode, remove the key — Babel 8 defaults to helpers only.
- If you need core-js polyfills, use the corejs option explicitly.
- Document the Babel 8 option changes in your team's build config guide.
When it happens
Trigger: Having useBuiltIns: false (or any falsy value) in the @babel/plugin-transform-runtime options. Detected via Object.hasOwn at line 42, falsy branch at line 49.
Common situations: Babel 7 to 8 migration where useBuiltIns: false was set to force helper-based polyfills; a preset that explicitly set useBuiltIns: false for older environments.
Related errors
- The 'polyfill' option has been removed. Use the 'corejs'opti
- The 'useBuiltIns' option has been removed. The @babel/runtim
- The 'polyfill' option has been removed. The @babel/runtime m
- @babel/plugin-transform-react-jsx: Since Babel 8, an inline
- @babel/plugin-transform-react-jsx: Since "useBuiltIns" is re
AI-assisted analysis of babel/babel@06b6eae39d (2026-08-03).
Data as JSON: /data/errors/ea01b6710cfd6386.json.
Report an issue: GitHub.