-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add support for flow in babel #77
Conversation
…l when the flow-bin dependency is available
…s`-section from the `devDependencies`
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.
Just one last thing!
README.md
Outdated
@@ -111,6 +112,10 @@ module.exports = Object.assign(jestConfig, { | |||
> configuring things to make it less magical and more straightforward. Extending | |||
> can take place on your terms. I think this is actually a great way to do this. | |||
|
|||
### Flow support | |||
|
|||
If the `flow-bin` is a dependency on the project the `@babel/preset-flow` will automatically get loaded you only need to install it manually by running `npm install --save-dev @babel/preset-flow` |
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.
This needs to be updated. They shouldn't have to install the preset.
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.
Whoops, forgot to update the text :)
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.
Updated!
Updated the text mentioning the flow support
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.
Thanks!
🎉 This PR is included in version 0.48.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Great thanks, @kentcdodds! |
Detects whether
flow-bin
is a dependency on the project, if so it will load the@babel/preset-flow
-module.What:
In
babelrc.js
we should check ifflow-bin
is a dependency and then load the@babel/preset-flow
Why:
We have copied the same away
react
is being detected by usingifAnyDep
-utilityHow:
Small change to
babelrc.js
Checklist: