babel7config-for-jsx
v1.0.0
Published
Common babel config for jsx
Downloads
2
Readme
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