3 ms·
Though nice to see moment and webpack
by spraak 10y ago
Though nice to see moment and webpack
- todd3834 10y agoAnd mocha
- simplify 10y agomoment.js is a monolithic beast. I would love to see date-fns instead https://github.com/date-fns/date-fns https://github.com/date-fns/date-fns
- Pigo 10y agoNice, ask and ye shall receive. I'm going to have to check this out. There's so much to moment though, is it missing any key features of moment?
- kossnocorp 10y agoHi, the date-fns creator here. We don't have extended time zone support (IANA) and have much fewer translations. But all of that is in progress. Regarding date-manipulations date-fns combines all of the Moment functions and even more (that we found in other libraries; ~150 in total). Check it out: https://github.com/date-fns/date-fns https://github.com/date-fns/date-fns
- kossnocorp 10y agoThank you for kind words!
- irrational 10y agoand lodash.
- Pigo 10y agoAgreed, at least with webpack. My number one gripe with moment is that I have to shim it in when using webpack. It still expects to be added to global scope, just like jquery. I'd really like to find a modular version, or another project that has as much functionality.
- tracker1 10y agoI haven't had any problem with `require('moment')` doesn't leak into my global scope. jQuery is a different story, given how plugins tend to work.
- kossnocorp 10y agoHello, date-fns author here (a Moment competitor). date-fns was designed for use with webpack, so unlike Moment it won't bloat your build with unused function. If you don't need IANA support, you'll love it https://date-fns.org/ https://date-fns.org/