theKashey / react-scroll-locky

📜🔒 – React full-cream "anti-scroll" library, you were looking for
57 stars 2 forks source link

Add react-dom to peerDependencies #1

Closed denkristoffer closed 6 years ago

theKashey commented 6 years ago

Hey! Why would one need this? React-dom is used by underlaying library - react-locky, and listed as it's peer deps.

denkristoffer commented 6 years ago

Hey, you're right! Sorry about that. I added it because I was trying to compare react-scroll-locky to other alternatives on bundlephobia, which complains about a missing react-dom dependency: https://bundlephobia.com/result?p=react-scroll-locky

The issue must be somewhere with how that site handles the dependencies then 🙂

theKashey commented 6 years ago

actually you were right - I have to specify peer dependencies of my dependencies, or they will become my dependencies, not peer dependencies. That's is not a problem for library itself, but all "package analyzers" will add react-dom to the package size :)

theKashey commented 6 years ago

🔥https://bundlephobia.com/result?p=react-scroll-locky@1.1.3 reports size of 3.4kb, with 60% consumed by underlaying react-locky.