3 ms·
Source code is what you write and read, but sometimes you write one thing and people can only read it after your pre processing. Why not enable pretty output?
by throwaway290 3y ago
Source code is what you write and read, but sometimes you write one thing and people can only read it after your pre processing. Why not enable pretty output?
Plus I suspect minifying HTML or JS is often cargo cult (for small sites who are frying the wrong fish) or compensating for page bloat
- robertlagrant 3y agoIt does stuff like tree shaking as well; it's quite good. If your page is bloated, it makes it better. If your page is not bloated, it makes it better.
- throwaway290 3y agoTree-shaking is orthogonal to minification tho.
- robertlagrant 3y agoThat's true.
- dgb23 3y agoIt doesn't compensate bloat, but it reduces bytes sent over the wire, bytes cached in between and bytes parsed in your browser for _very_ little cost. You can always open dev tools in your browser and have an interactive, nicely formatted HTML tree there with a ton of inspection and manipulation features.
- throwaway290 3y agoIn my experience usually the bigger difference is made by not making it bloated in the first place... As well as progressive enhancement, nonblocking load, serving from a nearby geolocation etc. I see projects minify all the things by default while it should be literally the last measure with least impact on TTI