3 ms·
Agreed, 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, ju
by Pigo 10y ago
Agreed, 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/