question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moment.js bundle size too large

See original GitHub issue

Hello, Thank you for the great library!

Day.Js is a nice alternative to me, seems we only have to replace moment to dayjs without any other code change to reduce bundle size from 60kb (moment) to 2kb (dayjs)


ref:

⏰ Day.js 2KB immutable date library alternative to Moment.js with the same modern API

https://github.com/iamkun/dayjs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wanasitcommented, Jan 13, 2020

Really sorry for my laziness and delay… This has been worked on. Please update to chrono 1.4+

0reactions
tamirvscommented, Jan 11, 2020

Yes it’s a shame:

img

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to optimize moment.js with webpack - GitHub
When you write var moment = require('moment') in your code and pack with webpack, the size of the bundle file gets heavyweight because...
Read more >
Why is my Webpack bundle so large? - Stack Overflow
Moment.js is supposed to be 30 KB gzipped and Handlebars is supposed to be less than 10 KB gzipped. But when I use...
Read more >
How We Managed to Shed 300kb of Moment.Js Size in Angular
New Moment.js size. With this small change, we at Rise have managed to reduce the bundle size by almost 305KB (non-gzip) and 81KB...
Read more >
Life after Moment.js | 8th Light
As you can see, the bundle with Moment is almost twice as big as the one with Luxon, while the bundle with day.js...
Read more >
Small Bundles, Fast Pages: What To Do With Too Much ...
Analyze and fix JavaScript bundle performance issues with ... 1// Upper size limit, in KB, that will count a package as a small...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found