A wrapper around @babel/preset-react
with optional production enhancements.
This preset includes babel-preset-kyt-core
- you do not need to install both.
- Automatically strips
propTypes
when(NODE|BABEL)_ENV=production
. - Properly passes
{ development: true }
to@babel/preset-react
when(NODE|BABEL)_ENV=development
.
$ yarn add --dev babel-preset-kyt-react
$ npm i --save-dev --save-exact babel-preset-kyt-react
-
useProductionTransforms
(Boolean
) - whether to include these plugins; default:true
: -
envOptions
(Object
) - passed down tobabel-preset-kyt-core
. See more. -
includeRuntime
(Boolean
) - whether or not to include@babel/plugin-transform-runtime
; default:false