Configuration for React Native
- Dominant language
- JavaScript
- Stars
- 797
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
This is a:
- [x] Bug Report
- [ ] Feature Request
- [ ] Question
- [ ] Other
Which concerns:
- [x] flow-runtime
- [x] babel-plugin-flow-runtime
- [ ] flow-runtime-validators
- [ ] flow-runtime-mobx
- [ ] flow-config-parser
- [ ] The documentation website
---
### What is the current behaviour?
`require is not defined` on app start up
---
### What is the expected behaviour?
App starts correctly
---
### Which package versions are you using?
react-native: 0.57.8
flow-runtime: 0.17.0
babel-plugin-flow-runtime: 0.19.0
`.babelrc`
``` json
{
"presets": [
"module:metro-react-native-babel-preset",
"@babel/preset-flow",
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
[
"@babel/plugin-transform-flow-strip-types"
],
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
[
"flow-runtime",
{
"assert": true,
"annotate": true,
"optInOnly": true
}
],
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-json-strings",
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
]
}
```
I haven't found a correct configuration for react-native 0.57+ and babel 7 on Internet. This might be me doing something wrong. I tried my best to convert the configuration from [here](https://codemix.github.io/flow-runtime/#/docs) to use with react-native and babel 7 though.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.