Read more of what you can do with Intl, as well as see the full code mentioned in this short, in my full blog post: www.builder.io... #javascript #performance #webdev #js
Hey man! Great video, I really like the short, sweet, but dense knowledge transfer with a bit of entertainment mixed in. Can you tell me the name of the plugin you have, which outputs the code in comments?
I used to use moment for date formatting. (Added 61kb) Then I switched to day.js. (Removed 56kb, Bundle Size = 5kb) After this video, I dropped both of them. (Removed 4.572kb, Bundle Size = 428b) And with Next 13, It doesn't even matter. (Removed 428b, Bundle Size = 0kb)
I thought you were replacing the library with just Intl... not that then you needed a function with 20 lines of code for a single thing. It's better to use a library (not moment) that can solve every date problem you have on your app rather than have multiple 20 line functions on an utils file.
Full code examples, and more cool things you can do with `Intl`, in my full blog post: www.builder.io/blog/relative-time
It's pretty incredible how co-pilot can be used to make this kind of demo so seamless
btw moment developers suggest using luxon instead
Hey man! Great video, I really like the short, sweet, but dense knowledge transfer with a bit of entertainment mixed in.
Can you tell me the name of the plugin you have, which outputs the code in comments?
I think it is co-pilot
I used to use moment for date formatting. (Added 61kb)
Then I switched to day.js. (Removed 56kb, Bundle Size = 5kb)
After this video, I dropped both of them. (Removed 4.572kb, Bundle Size = 428b)
And with Next 13, It doesn't even matter. (Removed 428b, Bundle Size = 0kb)
I thought you were replacing the library with just Intl... not that then you needed a function with 20 lines of code for a single thing. It's better to use a library (not moment) that can solve every date problem you have on your app rather than have multiple 20 line functions on an utils file.
Could u tell me What's the name of the extension that gives u the size of the imports ?
Import Cost for VS Code
@@Steve8708 Thank you.