Files
Monkey-Test/WebDriverAgent/Inspector/node_modules/babel-plugin-react-constant-elements
2019-01-25 17:01:52 +08:00
..
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00

babel-plugin-react-constant-elements

Treat React JSX elements as value types and hoist them to the highest scope

Installation

$ npm install babel-plugin-react-constant-elements

Usage

.babelrc

{
  "plugins": ["react-constant-elements"]
}

Via CLI

$ babel --plugins react-constant-elements script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["react-constant-elements"]
});