solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
5.04k stars 377 forks source link

pass generated html through html minifier terser #864

Open samualtnorman opened 1 year ago

samualtnorman commented 1 year ago

https://github.com/terser/html-minifier-terser

Would it be possible to integrate html minifier terser into solid start out of the box? Html minifier terser normally has savings around 10% which is quite significant.

I'm guessing comment removal needs to be turned off. And this minifier does tricks like leaving out end tags if it knows the browser will automatically insert them which I'm not sure will break how solid start works.

boehs commented 1 year ago

HTML Minification... Maybe eventually... But I'm skeptical of those results. Whitespace is pretty cheap when gzipped, unlike minifying CSS and javascript where the code actually changes.

boehs commented 1 year ago

I'd like to add that you can almost certainly add a vite plugin yourself and everything will just work :tm:

boehs commented 1 year ago

I suspect we have lots of room to improve on bundle sizes, but this is... pretty low