joshwcomeau / use-sound

A React Hook for playing sound effects
MIT License
2.76k stars 98 forks source link

Make Howler a peer dependency. #47

Closed ivands closed 3 years ago

ivands commented 4 years ago

Can we make Howler a peer dependency? So people can upgrade to the latest howler without the need for you to upgrade the version every time.

joshwcomeau commented 4 years ago

Hm, so I imagine people could use Yarn resolutions if they needed to do that, right? I presume there's an NPM alternative now as well.

I like the idea of keeping it as a dependency because I'd rather keep the "happy path" simple. Since I don't imagine most folks will care about Howler versions, I don't mind if that path is a bit more complicated (though I do want to make sure it's possible!)

n1ru4l commented 4 years ago

npm will now install peerDependencies by default.

0xdevalias commented 3 years ago

I like the idea of keeping it as a dependency because I'd rather keep the "happy path" simple.

Wouldn't 'keeping the happy path simple' just involve telling people to install both as part of the 'getting started' docs though? I feel like this is a pretty common case for frontend web-dev, so shouldn't be too much of a burden for users, while making this hook far more useful for power-users.

joshwcomeau commented 3 years ago

I don't have the bandwidth to think about this. Forks encouraged.