7
Tounai
4y

Last night I checked the size of my JS modules. The biggest one ? moment.js. It's disappointing

Comments
  • 2
    It bundles all locales by default. It is possible to eliminate the ones you don't need.

    Also, I'm betting most projects don't actually need moment when worst case they need to display a couple of different formats and do some light logic. You can easily do your own date utils or even copy paste something.
  • 1
    @theuser Yeah I saw that ! I'm even searching a way to remove it totally because it's a depedency of Chart.js but I don't use any time based chart
  • 7
    Ahh, I love the smell of NPM dependency rants in the morning.
  • 4
    @Root Even better, I was able decrease the moment footprint by installing another dependency that comes with its own dependencies (cue the dependency rabbit hole).
  • 1
    @theuser Please, just stop already. It's dead, Jim.
  • 1
    Optimizing bundle size is a fucking waste of time.
  • 0
    @Jilano Lets hear it for our poor dead friend then
Add Comment