bakerface / react-native-svg-web

A web replacement for react-native-svg
44 stars 11 forks source link

Peer dep warning for `prop-types` #16

Open crutchcorn opened 3 years ago

crutchcorn commented 3 years ago

I am using a React Native project with TypeScript. Because I am using TypeScript, I do not want to be using prop-types. However, npm 7 added back auto-installing peer deps, and will throw errors if a peer dependency is not met/invalid.

I would like to suggest migrating prop-types to an optional dependency, or omitting it entirely to sidestep this issue. I'd be willing to make a PR with whatever decision is made

crutchcorn commented 3 years ago

It turns out there's also a way to set peerDeps as optional:

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependenciesmeta

I'll make a PR to do just that, as that seems to fix the error