Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ module.exports = function(api, opts, env) {
useBuiltIns: true,
},
],
isFlowEnabled && [require('@babel/preset-flow').default],
].filter(Boolean),
plugins: [
// Strip flow types before any other transform, emulating the behavior
// order as-if the browser supported all of the succeeding features
isFlowEnabled &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link to the issue here

require('@babel/plugin-transform-flow-strip-types').default,
// Experimental macros support. Will be documented after it's had some time
// in the wild.
require('babel-plugin-macros'),
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"@babel/plugin-syntax-dynamic-import": "7.0.0",
"@babel/plugin-transform-classes": "7.1.0",
"@babel/plugin-transform-destructuring": "7.0.0",
"@babel/plugin-transform-flow-strip-types": "7.0.0",
"@babel/plugin-transform-react-constant-elements": "7.0.0",
"@babel/plugin-transform-react-display-name": "7.0.0",
"@babel/plugin-transform-runtime": "7.1.0",
"@babel/preset-env": "7.1.0",
"@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"@babel/runtime": "7.0.0",
"babel-loader": "8.0.4",
Expand Down