Registry / http-networking / babel-plugin-transform-react-es6-displayname

babel-plugin-transform-react-es6-displayname

JSON →
library1.0.0-beta1.4jsnpmunverified

A Babel plugin that automatically adds a displayName property to React ES6 class components using the class name. This helps with debugging and DevTools when using ES6 classes. Version 1.0.0-beta1.4 is a pre-release with no recent updates; the repository is archived and unmaintained. It only supports ES6 class components (not functional components) and relies on Babel 6.x. No security issues reported.

npm install babel-plugin-transform-react-es6-displayname
INSTALL
IMPORT
SIG · BABEL-PLUGIN-TRANS
B
babel-plugin-transform-react-es6-displayname
http-networkingjavascriptv1.0.0-beta1.4
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
module.exports = require('babel-plugin-transform-react-es6-displayname'); // in .babelrc: "plugins": ["transform-react-es6-displayname"]
import plugin from 'babel-plugin-transform-react-es6-displayname'; // CommonJS, not ESM
This is a Babel plugin, typically loaded via .babelrc or babel.config.js using the string name, not directly imported in application code.

Shows how to add the plugin to .babelrc and the transformation of a class component.

// .babelrc { "plugins": ["transform-react-es6-displayname"] } // Input: class MyComponent extends React.Component { render() { return <div>Hello</div>; } } // Output: class MyComponent extends React.Component { static displayName = 'MyComponent'; render() { return <div>Hello</div>; } }
Debug
Known issues
deprecatedRepository is archived and unmaintained.
fix
Consider using babel-plugin-react-displayname which supports functional components and newer Babel versions.
affects: >=0.0.0
gotchaOnly works with ES6 class components; does not add displayName to functional components.
fix
Use a different plugin or manually add displayName for functional components.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-plugin-transform-react-es6-displayname'
Plugin not installed or incorrectly required.
fix
npm install --save-dev babel-plugin-transform-react-es6-displayname
Error: The plugin "transform-react-es6-displayname" didn't export a Plugin instance
Incompatible with Babel 7+; this plugin is for Babel 6.
fix
Use Babel 6 or switch to a compatible plugin.
Upgrade
Version history
1.0.0-beta1.4latest on npm
Audit
Dependencies
babel-corerequiredRequired as a Babel plugin; transforms code during build.
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
babel-plugin-transform-react-es6-displayname — npm install babel-plugin-transform-react-es6-displayname · libregistry