solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

pass generated html through html minifier terser

Open samualtnorman opened this issue 2 years ago • 3 comments

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.

samualtnorman avatar May 02 '23 10:05 samualtnorman

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 avatar May 04 '23 19:05 boehs

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

boehs avatar May 04 '23 19:05 boehs

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

boehs avatar May 04 '23 19:05 boehs