jsilvax is a user on toot.cafe. You can follow them or interact with them if you have an account anywhere in the fediverse.
jsilvax @jsilvax

If you're still using , I suggest switching over to -fns. It will significantly reduce your bundle size 🙂
date-fns.org/

· Web · 9 · 14

@jsilvax thanks for the tip! Already spreading that on my circles 😄

@jsilvax Thanks! Our frontend team is complaining that Moment is currently about an eighth of our total deployment size.

@tek NP :) Yeah, this should help since date-fns allows you to choose and use exactly the functions you need

@jsilvax Nice! Saw this recently somewhere else, giving it a go now to see what the difference looks like.

@blakeembrey Awesome! I wish I would have documented the actual difference it made when our team made the switch a few months ago. Please share if you do :)

@jsilvax Seems like, for my simple blog use-case, it's 168KB to 154KB.

@jsilvax (minified size change in the deployed JavaScript bundle)

@jsilvax I've been looking for something exactly like this! Thanks for sharing :)