$ npm install babel-plugin-transform-react-constant-elements
Treat React JSX elements as value types and hoist them to the highest scope
$ npm install babel-plugin-transform-react-constant-elements
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-react-constant-elements"]
}
$ babel --plugins transform-react-constant-elements script.js
require("babel-core").transform("code", {
plugins: ["transform-react-constant-elements"]
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE