Change package.json for React Native to allow for optional deps for views #436
+21
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small PR and related to #425
I've been wondering about a way to properly do this within the package.json and was looking through some other projects and found the way https://github.com/computerjazz/react-native-draggable-flatlist/blob/main/package.json handles this.
It seems peerDependencies seems the way to go, look through the documentation on NPM and it seems we can label some of the peer deps as optional which I think will work well for the view related packages (React Native MapLibre and so on.)
Documentation if anyone else want to have a look in case I've missed something https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependencies
This PR just makes that change. Another way to potential do this is to separate the view and core logic into to two separate package which we upload separately onto NPM