Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add requireDirective to strip-flow-types for use in React preset #5468
Let's keep the 7.0 fun train rolling!
changed the title from
Remove flow and add dev option to react preset
Add requireDirective to strip-flow-types for use in React preset
Jul 21, 2017
What would people think about throwing an error if the file contains Flow annotations without
My motivation for wanting to remove Flow-stripping from
No objections from the React side and also received positive thoughts from Flow folks on our end. This seems like a good change.
No hard opinion on @loganfsmyth's proposal but I guess erroring early sounds a little nicer. Is there a way to add the syntax-flow plugin only if the file has the directive?
@spicyj that particular change can't really work we can't know anything until it's parse already (so have to parse beforehand, or need to redo how that works which would reparse I think?