$ npm install babel-plugin-transform-react-jsx-source
Adds source file and line number to JSX elements.
###In
<sometag />
###Out
<sometag __source={{fileName: 'this/file.js', lineNumber: 10}}/>
$ npm install babel-plugin-transform-react-jsx-source
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-react-jsx-source"]
}
$ babel --plugins transform-react-jsx-source script.js
require("babel-core").transform("code", {
plugins: ["transform-react-jsx-source"]
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE