This is a react-transform that retains display names even after the src has been uglified/mangled.
This is useful when you need to debug a React application that has been minified using React Devtools.
npm i react-transform-display-names --save-dev
Add this to your .babelrc
.
{
"presets": [
"react"
],
"plugins": [
["react-transform", {
"transforms": [{
"transform": "react-transform-display-names"
}]
}]
]
}
Because of how react-transform works, functional components may not retain their display names.
Special thanks to pwmckenna for creating the start kit react-transform-noop