1.0.0 • Published 6 years ago
babel-preset-qs-react-app v1.0.0
babel-preset-qsoft-react-app
Usage Outside of Create React App
If you want to use this Babel preset in a project not built with Create React App, you can install it with following steps.
First, install Babel.
Then install babel-preset-qsoft-react-app.
npm install babel-preset-qsoft-react-app --save-dev
Then create a file named .babelrc
with following contents in the root folder of your project:
{
"presets": ["qsoft-react-app"]
}
This preset uses the useBuiltIns
option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign
is available or polyfilled.
Usage with TypeScript
To use this package with @babel/preset-typescript
, you need to disable @babel/preset-flow
first.
You can achieve this by doing:
{
"presets": [
["qsoft-react-app", {
"flow": false
}],
"@babel/typescript"
]
}
List plugins
- @babel/plugin-proposal-class-properties
- @babel/plugin-proposal-decorators
- @babel/plugin-proposal-object-rest-spread
- @babel/plugin-syntax-dynamic-import
- @babel/plugin-transform-classes
- @babel/plugin-transform-destructuring
- @babel/plugin-transform-react-constant-elements
- @babel/plugin-transform-react-display-name
- @babel/plugin-transform-regenerator
- @babel/plugin-transform-runtime
- babel-plugin-macros
- babel-plugin-transform-dynamic-import
- babel-plugin-transform-react-remove-prop-types
List preset
- @babel/preset-env
- @babel/preset-flow
- @babel/preset-react
1.0.0
6 years ago