babel plugin for react display name with file path prefix.
$ yarn add --dev babel-plugin-react-path-display
.babelrc
{
"plugins": ["react-path-display"]
}
import React from 'react'
export default class Link extends React.Component {
render() {
return <div>hello world</div>;
}
}
↓ ↓ ↓ ↓ ↓ ↓
import React from 'react';
export default class Link extends React.Component {
render() {
return <div>hello world</div>;
}
static displayName = 'path.to.file.Link';
}
Thanks goes to these wonderful people (emoji key):
akameco 💻 📖 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © akameco