You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 if `flow-bin` is a dependency and then load the `@babel/preset-flow`
**Why**:
We have copied the same away `react` is being detected by using `ifAnyDep`-utility
**How**:
Small change to `babelrc.js`
**Checklist**:
- [X] Documentation
- [ ] Tests
- [X] Ready to be merged
- [ ] Added myself to contributors table
<!-- feel free to add additional comments -->
> configuring things to make it less magical and more straightforward. Extending
112
113
> can take place on your terms. I think this is actually a great way to do this.
113
114
115
+
### Flow support
116
+
117
+
If the `flow-bin` is a dependency on the project the `@babel/preset-flow` will automatically get loaded when you use the default babel config that comes with `kcd-scripts`. If you customised your `.babelrc`-file you might need to manually add `@babel/preset-flow` to the `presets`-section.
constRUNTIME_HELPERS_WARN='You should add @babel/runtime as dependency to your package. It will allow reusing so-called babel helpers from npm rather than bundling their copies into your files.'
'You should add @babel/runtime as dependency to your package. It will allow reusing so-called babel helpers from npm rather than bundling their copies into your files.'
0 commit comments