Skip to content

Replace all usage of moment.js with date-fns, cutting ~60kB from bundle size

Yuto Takano requested to merge remove-moment into master

We had both moment and date-fns in our dependencies, when both do basically the same thing (parse dates, format dates).

Moment.js is no longer maintained as of several years ago, and its bundle size is larger than that of date-fns:

This MR thus removes moment, and replaces all of its usage (which were only like 4 places) with date-fns code.

As a result, the production bundle size decreased from 2053 kB to 1993 kB, around a ~3% decrease.

Screenshot_2025-09-14_14-22-11

Screenshot_2025-09-14_14-44-14

Merge request reports

Loading