baptistebriel / smooth-scrolling

smooth scrolling and parallax effects on scroll
MIT License
612 stars 75 forks source link

Fixes webpack production build issues #88

Closed xavierfoucrier closed 6 years ago

xavierfoucrier commented 6 years ago

Instead of relaying on the class name which can result in various problems, it is better to test if the constructor equals the class. This also prevents webpack from mangling the class name and break the script in production mode.

baptistebriel commented 6 years ago

Thank you for this pull request, @xavierfoucrier!

xavierfoucrier commented 6 years ago

Thanks @baptistebriel, that's awesome. Note that I have modified the package version in my pull request, and I just saw that you update it again on your package update (you squeeze v2.3.10), never mind, it works fine! Big thanks :+1:

baptistebriel commented 6 years ago

Ah, yes didn’t noticed it — I updated it to 2.3.11 and published the update to npm.

xavierfoucrier commented 6 years ago

No problem! Thanks again for this update.