Registry / serialization / babel-plugin-transform-builtin-extend

babel-plugin-transform-builtin-extend

JSON →
library1.1.2jsnpmunverified

A Babel 6 plugin that enables extending built-in JavaScript types like Error and Array, which require special handling due to their native constructor behavior. It uses static analysis to detect class extensions of globals you specify, optionally with an approximate mode for IE <= 10. This plugin is a specialized tool for a now-legacy Babel version (6.x) and has been superseded by native class support in modern JavaScript and Babel 7+. No active maintenance since 2016.

npm install babel-plugin-transform-builtin-extend
INSTALL
IMPORT
SIG · BABEL-PLUGIN-TRANS
B
babel-plugin-transform-builtin-extend
serializationjavascriptv1.1.2
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.

plugin (default)
In .babelrc: ["babel-plugin-transform-builtin-extend", { globals: ["Error", "Array"] }]
Using require('babel-plugin-transform-builtin-extend') in code
This is a Babel plugin, not a runtime import. It must be configured in Babel 6 config.

Shows Babel 6 configuration to extend Error and Array classes using static analysis.

{ "plugins": [ ["babel-plugin-transform-builtin-extend", { "globals": ["Error", "Array"], "approximate": false }] ] }
Debug
Known issues
deprecatedThis plugin is for Babel 6 only. Babel 7+ has native support for extending built-ins via @babel/plugin-proposal-class-properties or @babel/plugin-transform-classes.
fix
Upgrade to Babel 7+ and use appropriate modern plugins.
affects: all
gotchaThe 'approximate' mode for IE <= 10 does not correctly implement built-in extension semantics; it falls back to ES5 inheritance which may not work as expected.
fix
Avoid using approximate mode unless targeting legacy browsers and understand the limitations.
affects: <=1.1.2
gotchaStatic property inheritance relies on __proto__, which is not supported in IE <= 10 and some older browsers.
fix
Do not rely on static inheritance from extended built-ins if targeting IE <= 10.
affects: <=1.1.2
Errors
Common errors & fixes
Error: Cannot find module 'babel-plugin-transform-builtin-extend'
Plugin not installed or used with Babel 7+ (which uses @babel scoped packages).
fix
npm install babel-plugin-transform-builtin-extend --save-dev and ensure Babel 6 is used.
ReferenceError: __proto__ is not defined
Code runs in an environment where __proto__ is not supported (e.g., IE <= 10).
fix
Enable the 'approximate' option in plugin config, with caveats.
Upgrade
Version history
1.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
16
OpenAI (training)
3
Amazon
1
Resources
babel-plugin-transform-builtin-extend — npm install babel-plugin-transform-builtin-extend · libregistry