babel-plugin-transform-react-constant-elements

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

MIT 34 个版本
安装
npm install babel-plugin-transform-react-constant-elements
yarn add babel-plugin-transform-react-constant-elements
pnpm add babel-plugin-transform-react-constant-elements
bun add babel-plugin-transform-react-constant-elements
README

babel-plugin-transform-react-constant-elements

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

Installation

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

Usage

.babelrc

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

Via CLI

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

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-react-constant-elements"]
});
版本列表
7.0.0-beta.3 2017-10-15
7.0.0-beta.2 2017-09-26
7.0.0-beta.1 2017-09-19
7.0.0-beta.0 2017-09-12
7.0.0-alpha.20 2017-08-30
7.0.0-alpha.19 2017-08-07
7.0.0-alpha.18 2017-08-03
7.0.0-alpha.17 2017-07-26
7.0.0-alpha.16 2017-07-25
7.0.0-alpha.15 2017-07-12
7.0.0-alpha.14 2017-07-12
7.0.0-alpha.12 2017-05-31
7.0.0-alpha.11 2017-05-31
7.0.0-alpha.10 2017-05-25
7.0.0-alpha.9 2017-04-18
7.0.0-alpha.8 2017-04-17
7.0.0-alpha.7 2017-04-05
7.0.0-alpha.3 2017-03-23
7.0.0-alpha.1 2017-03-02
6.23.0 2017-02-13
6.22.0 2017-01-20
6.9.1 2016-05-29
6.8.0 2016-05-02
6.5.0-1 2016-02-07
6.5.0 2016-02-07
6.4.0 2016-01-06
6.3.13 2015-12-04
6.2.4 2015-11-25
6.1.20 2015-11-13
6.1.18 2015-11-12
6.1.17 2015-11-12
6.1.4 2015-11-11
6.0.14 2015-10-30
6.0.2 2015-10-29