Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@stellar-apps/babel-preset-react

jaredlunde11MIT1.0.4

A babel preset for configuring React transforms in Stellar apps and packages.

readme

@stellar-apps/babel-preset-react

A babel preset for configuring React transforms in Stellar apps and packages.

Installation

yarn add --dev @stellar-apps/babel-preset-react

Usage

.babelrc

{
  "presets": [
    [
      "@stellar-apps/react", {
        "transformConstant": true,
        "transformPure": false
      }
    ]
  ]
}

Included presets

  • @babel/preset-react

Included plugins

  • @babel/plugin-transform-react-constant-element
  • babel-plugin-transform-react-pure-components
  • babel-plugin-transform-react-remove-prop-types

Options

transformPure

  • Define false to turn off babel-plugin-transform-react-pure-components

transformConstant

  • Define false to turn off @babel/plugin-transform-react-constant-element

removePropTypes

  • Define false to turn off babel-plugin-transform-react-remove-prop-types