| ▲ | exabrial 3 days ago | |
>For context, I consider 1 MB of Javascript to be on the heavy side for a web page/app. I feel like > 2kb of Javascript is heavy. Literally not needed. | ||
| ▲ | tracker1 3 days ago | parent | next [-] | |
While I tend to agree... I've been on enough relatively modern web apps that can hit 8mb pretty easily, usually because bundling and tree shaking are broken. You can save a lot by being judicious. IMO, the worst offenders are when you bring in charting/graphing libraries into things when either you don't really need them, or otherwise not lazy loading where/when needed. If you're using something like React, then a little reading on SVG can do wonders without bloating an application. I've ripped multi-mb graphing libraries out to replace them with a couple components dynamically generating SVG for simple charting or overlays. | ||
| ▲ | dmit 3 days ago | parent | prev [-] | |
Preact have been fairly faithful to being <10k (compressed)! (even though they haven't updated the original <3k claim since forever) | ||