documentationjs / documentationjs/documentation
Platform specific files in React Native fail on build
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 481
- PR merge metrics
- No merged PRs in 30d
Description
**Version: 6.3.2**
**Framework: react-native**
**File structure:**
```
src
|
+scenes
|
| +--AddressInput
|
+components
|
+--Geolocator.ios.js
|
+--Geolocator.android.js
```
**Code:** `import Geolocator from '/components/Geolocator`
**cli command:** `documentation serve /src`
**Error: Cannot find module './components/Geolocator' from src/scenesAddreswInput**
In react native, platform specific code is automatically inferred by the operating system. This means that importing a component like `Geolocator` does not need an explicit OS declaration.
Documentation is unable to resolve the file path and throws an error. Happy to work on this and submit a PR if it hasn't already been tackled
Contributor guide
Assessment
This issue has not been assessed yet.