babel-preset-beidou-client
v2.1.0
Published
Babel preset for Beidou Client.
Downloads
112
Readme
babel-preset-beidou-client
This preset includes the following plugins:
- @babel/preset-env
- @babel/preset-react
- @babel/preset-typescript [optional]
- @babel/plugin-proposal-function-sent
- @babel/plugin-proposal-decorators
- @babel/plugin-proposal-class-properties
- @babel/plugin-proposal-export-namespace-from
- @babel/plugin-proposal-numeric-separator
- @babel/plugin-proposal-throw-expressions
- babel-plugin-add-module-exports
- react-hot-loader/babel [only for dev]
Install
Install the preset
npm install --save-dev babel-preset-beidou-client
Configuration
This preset support dynamic compile browser targets, set browserslist in your package.json
{
"browserslist": ["> 1%", "last 2 versions"]
}
Or using default browserslist ['>1%', 'last 4 versions', 'not ie < 9']
.
Config in .babelrc
{
"presets": [["babel-preset-beidou-client", { "typescript": true }]]
}
Options
- typescript: enable typescript
- env: config passed to preset-env