Add new flow preset (#5288)
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
|
||||
> Babel preset for all React plugins.
|
||||
|
||||
This preset includes the following plugins:
|
||||
This preset includes the following plugins/presets:
|
||||
|
||||
- [syntax-flow](https://babeljs.io/docs/plugins/syntax-flow/)
|
||||
- [preset-flow](https://babeljs.io/docs/plugins/preset-flow/)
|
||||
- [syntax-jsx](https://babeljs.io/docs/plugins/syntax-jsx/)
|
||||
- [transform-flow-strip-types](https://babeljs.io/docs/plugins/transform-flow-strip-types/)
|
||||
- [transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/)
|
||||
- [transform-react-display-name](https://babeljs.io/docs/plugins/transform-react-display-name/)
|
||||
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-preset-react",
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"babel-plugin-syntax-flow": "^6.3.13",
|
||||
"babel-preset-flow": "^6.22.2",
|
||||
"babel-plugin-syntax-jsx": "^6.3.13",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"babel-plugin-transform-react-display-name": "^6.22.0",
|
||||
"babel-plugin-transform-react-jsx": "^6.22.0",
|
||||
"babel-plugin-transform-react-jsx-source": "^6.22.0",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import presetFlow from "babel-preset-flow";
|
||||
import transformReactJSX from "babel-plugin-transform-react-jsx";
|
||||
import transformFlowStripTypes from "babel-plugin-transform-flow-strip-types";
|
||||
import transformSyntaxFlow from "babel-plugin-syntax-flow";
|
||||
import transformSyntaxJSX from "babel-plugin-syntax-jsx";
|
||||
import transformReactDisplayName from "babel-plugin-transform-react-display-name";
|
||||
|
||||
@@ -9,10 +8,11 @@ import transformReactDisplayName from "babel-plugin-transform-react-display-name
|
||||
// import transformReactJSXSelf from "babel-plugin-transform-react-jsx-self";
|
||||
|
||||
export default {
|
||||
presets: [
|
||||
presetFlow
|
||||
],
|
||||
plugins: [
|
||||
transformReactJSX,
|
||||
transformFlowStripTypes,
|
||||
transformSyntaxFlow,
|
||||
transformSyntaxJSX,
|
||||
transformReactDisplayName
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user