Replies: 1 comment
-
|
You can make the peer dependency optional But the bigger question is, why can't you just put the native code in the native workspace? If it needs native-only packages to work then it isn't really "shared", is it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've got e.g. packages/web-project , packages/mobile-app and packages/shared/{web,mobile}.
The shared workspace contains both shared code that is used for both web and native but also for native-only. Now, when shared code requires a native-only third party package I list this package as peerDependency in the shared workspace. But this results in warnings from Yarn with the web-only workspaces. These web-only workspaces will now complain that the native-only third party package dependency is not met.
What is the correct way to deal with this?
I'm using the yarn 4.9.2.
Beta Was this translation helpful? Give feedback.
All reactions