You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pass generated html through html minifier terser #864
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.
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.
I measured it on our basic fixture and it isn't worth enabling by default. Solid's compiled templates already ship with no indentation, so html-minifier-terser takes a prerendered page from 1856 to 1836 bytes, and after brotli both are 703 bytes. Zero savings on the wire.
Activity
boehs commentedon May 4, 2023
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 commentedon May 4, 2023
I'd like to add that you can almost certainly add a vite plugin yourself and everything will just work ™️
boehs commentedon May 4, 2023
I suspect we have lots of room to improve on bundle sizes, but this is... pretty low
birkskyum commentedon Jul 26, 2026
I measured it on our basic fixture and it isn't worth enabling by default. Solid's compiled templates already ship with no indentation, so
html-minifier-tersertakes a prerendered page from 1856 to 1836 bytes, and after brotli both are 703 bytes. Zero savings on the wire.