Skip to content

Commit

Permalink
docs: update monorepo autolinking section with a disclaimer (react-na…
Browse files Browse the repository at this point in the history
…tive-community#1341)

* Update monorepo section with another note

Adds a note explaining a caveat with auto-linking in a monorepo.  Ran into this problem today trying to get a monorepo working.

* Update docs/autolinking.md

Co-authored-by: James George <[email protected]>

* Update docs/autolinking.md

Co-authored-by: Michał Pierzchała <[email protected]>
Co-authored-by: James George <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2021
1 parent 83aa548 commit 35481b2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/autolinking.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,17 @@ correct location and update them accordingly:
- path to `native_modules.rb` in your `ios/Podfile`
- path to `native_modules.gradle` in your `android/settings.gradle`
- path to `native_modules.gradle` in your `android/app/build.gradle`

Dependencies are only linked if they are listed in the package.json of the mobile workspace, where "react-native" dependency if defined. For example, with this file structure:
```
/root
/packages
/mobile
/ios
/android
package.json <-- Only dependencies listed here are auto-linked
/components
package.json <-- Dependencies here are ignored when auto-linking
package.json
```
In this example, if you add a package with native code as a dependency of `components`, you need to also add it as a dependency of `mobile` for auto-linking to work.

0 comments on commit 35481b2

Please sign in to comment.