icambron / twix.js

:hourglass::left_right_arrow: A date range plugin for moment.js
https://isaaccambron.com/twix.js/
MIT License
379 stars 54 forks source link

Moment as a peerDependency. #68

Closed benmosher closed 9 years ago

benmosher commented 9 years ago

If moment is not a peer dependency, it can end up installing its own moment in its node_modules, which is the one it extends, but not the one that is returned by require('moment') in the application code.

This affected my builds both in Node and Webpack'd browser builds. Peer dependency fixed it.

Notably: you won't see the problem if moment is installed first, as npm can notice and not re-install, but this is not guaranteed. Installing twix, then moment should yield the issue.

benmosher commented 9 years ago

FWIW, I think this also resolves #67.

icambron commented 9 years ago

Oh, I bet it does. @vdmitriy can you confirm?

icambron commented 9 years ago

@benmosher Thanks!

icambron commented 9 years ago

Published as 0.6.4

vdmitriy commented 9 years ago

Unfortunately no ...