1.0.0 • Published 3 years ago

babel7config-for-jsx v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

babel7config-for-jsx

babel7config-for-jsx is designed for compiling react .jsx.

Installation

babel7config-for-jsx needs babel-runtime, so your need to install them before installing babel7config-for-jsx.

$ npm install @babel/runtime @babel/runtime-corejs3 core-js regenerator-runtime
$ npx install-peerdeps -D babel7config-for-jsx

Usage

Set babel config:

{
  "extends": "babel7config-for-jsx"
}

Caveats

babel7config-for-jsx will detect whether react/jsx-runtime exists, if exist, babel7config-for-jsx will set @babel/preset-react runtime='automatic';If not, babel7config-for-jsx will use @babel/plugin-transform-react-jsx-self @babel/plugin-transform-react-jsx-source