gajus / gajus/flow-runtime

breaks current react-native in ReactNativeTypes.js

Open
#170 0 comments 0 reactions 0 assignees View on GitHub
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:

- [ ] flow-runtime
- [X] babel-plugin-flow-runtime
- [ ] flow-runtime-validators
- [ ] flow-runtime-mobx
- [ ] flow-config-parser
- [ ] The documentation website

---

### What is the current behaviour?

if compiling a default react-native project with this .babelrc:
`{
"presets": [
"react-native"
],
"plugins": [
["flow-runtime", { assert: false, annotate: false }]
]
}
`

the react-native bundler will show this error:

`error: bundling failed: "TransformError: .../node_modules/react-native/Libraries/Renderer/shims/ReactNativeTypes.js: .../node_modules/react-native/Libraries/Renderer/shims/ReactNativeTypes.js: Property value expected type of string but got null"`

even if I add a `@flow-runtime ignore` at the beginning of that file.

---

### What is the expected behaviour?

it should still work and only files with proper pragmas should be touched.

---

### Which package versions are you using?

react-native@^0.48.3:
babel-plugin-flow-runtime@^0.11.1:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.