CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Remove Flow support in React preset #6118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Would be ideal but not a good idea to me because too many users are relying on this behavior. |
Why can't we introduce this breaking change in 7.0? |
Yes, we could. Let's discuss it at the weekly later today. |
Also via https://twitter.com/AdamRackis/status/898568493896839169 and other reports |
This preset always includes the following plugins: | ||
|
||
- [syntax-jsx](https://babeljs.io/docs/plugins/syntax-jsx/) | ||
- [transform-flow-strip-types](https://babeljs.io/docs/plugins/transform-flow-strip-types/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if it's worth including a note about how Flow syntax support is no longer enabled in 7.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's worth it :D . Added this:
> Note: Flow syntax support is no longer enabled in v7. For that, you will need to add the [Flow preset](https://babeljs.io/docs/plugins/preset-flow/).
7db8386
to
e2dee99
Compare
The Circle CI build started to fail on the
And I cannot reproduce on my side, any ideas? |
e2dee99
to
78e579f
Compare
throw path.buildCodeFrameError( | ||
"A @flow directive is required when using Flow annotations with " + | ||
"babel-preset-react or the `requireDirective` option.", | ||
"the `requireDirective` option.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I just found this, I think that it should be changed in this pr too. If i'm wrong please ping me and I will remove this changes.
@ramasilveyra I restarted the Circle CI build, now it passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#6118 (comment) I thought it was against 6.x?
lgtm if it lands in 7 π
@xtuc Was always for 7.0, not planning to do 6.x releases π |
testing in the repl for this build https://babeljs.io/repl/build/4665#?evaluate=false&lineWrap=true&presets=es2015%2Creact%2Cstage-0&babili=false&builtIns=false&debug=false&code_lz=PTAEAECsGcA9QIbQCYDMBQ6BuCBOoBTUAXlAB5kBLLAPjOgAcEA7YO4K2zVAV2YGMALpQD2zRAAoEALlDRBuSswDmASlABvAL5A&experimental=false&loose=false&spec=false&playground=true I guess we need flow/typescript in the repl options now π |
Remove Flow support in React preset. Needed to fix an incompatibility issue with typescript preset, another option could be adding a
noFlow
option.