Let's go through them quickly and look at some sample code. If you scroll down Bundlephobia, you will see that it suggests some lightweight alternatives, like luxon, day-js, date-fns: MomentJS does not work well with tree shaking algorithms and gets very large, especially if you need full internationalization support.Īccording to Budnlephobia - a tool that shows the performance impact of including the npm package, takes 228.4Kb minified and 71.2Kb minified + gzipped:
Const now = moment ( ) const tomorrow = now.