UPchieve/web

Only use "moment-timezone", remove "moment" as a dependency

Closed this issue · 2 comments

jkeat commented

https://stackoverflow.com/questions/49729646/using-both-moment-and-moment-tz

Remove moment as a separate package in your package.json and reference moment-timezone whenever you need an instance of the moment object. In fact, if you don't and you're referencing both packages separately, you'll be loading two largely identical versions of moment.

The documentation referenced by @robg in his comment is correct, it's just that the moment-timezone package itself loads moment as a dependency.

Companion server repo issue: https://github.com/UPchieve/server/issues/341

https://github.com/you-dont-need/You-Dont-Need-Momentjs/blob/master/README.md

Moment is a bloated behemoth. I've been using dayjs instead. I think the only thing you guys use moment for that dayjs doesn't support yet is the list of timezones. Which you could just grab and put in a json file