babel-preset-babelbing
A babel preset for transforming your JavaScript for Babelbing.
Install
$ yarn add -D babel-preset-babelbing
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
$ babel script.js --presets babelbing
Via Node API
;
Targeting Environments
This module uses @babel/preset-env to target specific environments.
Please refer to @babel/preset-env#targets for a list of available options.
For a list of browsers please see browserlist.
You may override our default list of targets by providing your own targets
key.
The following transpiles only for Node v6.
If you wish, you can also inherit our default list of browsers and extend them using additionalTargets
.
You may override our default debug option by providing your own debug
key.
React Development Mode
When process.env.NODE_ENV
is 'development'
, the development
mode will be set for @babel/preset-react
.
You may override our default development option by providing your own boolean development
key.
React PropTypes removal
This preset can be configured to remove propTypes using babel-plugin-transform-react-remove-prop-types with the following default options:
To enable this transformation with the default options, set the removePropTypes
option to true
:
The default options that will be used are:
mode: 'wrap' ignoreFilenames: 'node_modules'
Default options can be overridden using the removePropTypes
option. These options will be shallow-merged with the defaults:
For example, if you are using this plugin in a deployable app, you might want to use the remove mode for your production build (and disable this transform entirely in development for optimal build speeds).