0.1.0 • Published 7 years ago
babel-plugin-react-rename v0.1.0
babel-plugin-react-rename
import path from 'path';
export default (componentName, {filename, cwd}) => {
return path.relative(cwd, path.dirname(filename));
}
{
"plugins": [
["babel-plugin-react-rename", {
"only": "./src/component/**/*.js",
"rename": "./config/babel/getComponentName.babel.js"
}]
]
}
0.1.0
7 years ago