You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed that including moment.js (via pond and react-timeseries-charts) in our application added 500kb to the minified bundle.
This one library doubled the total size of our application and has a performance impact on page load times.
There is a thread over at moment discussing this issue.
At the bottom of the comments there are some alternatives suggested, which I can't comment on, but seem to be much smaller in size.
How tightly are pond / react-timeseries-charts coupled to the specifics of moment.js? would you consider using another library in order to remove half a meg from the builds?
The text was updated successfully, but these errors were encountered:
Yes, this has come up before. Thanks for the additional breakdown @jedhastwell.
The solution now is obviously to get off moment.js, which has been the only viable option up until recently. It has only got larger and the inability to separate out locales is killing its usefulness, at least on the client side. On top of this the maintainers don't seem to care about that and see it as a node.js library (at least that's been my take following this over the years). I guess that's their right.
Anyway, it would be possible to migrate now because date-fns seems to support timezones now. So I'll rename this item and leave it as a placeholder for that to hopefully happen down the road a bit.
A difficulty is that the 0.9.x branch of Pond, which is the dependency used by the current react-timeseries-charts code, is quite different from the 1.x branch of Pond, which will be used if the charts code ever gets ported to Typescript (there's an active project now to do that). So fixing this would be blocked by that work unless someone wants to step in and try to do the work on the 0.x code branch.
pjm17971
changed the title
Minified bundle size
Remove moment.js to improve bundle sizes
Feb 13, 2020
Hi,
We noticed that including
moment.js
(viapond
andreact-timeseries-charts
) in our application added 500kb to the minified bundle.This one library doubled the total size of our application and has a performance impact on page load times.
There is a thread over at moment discussing this issue.
At the bottom of the comments there are some alternatives suggested, which I can't comment on, but seem to be much smaller in size.
How tightly are
pond
/react-timeseries-charts
coupled to the specifics ofmoment.js
? would you consider using another library in order to remove half a meg from the builds?The text was updated successfully, but these errors were encountered: