Skip to content

pass generated html through html minifier terser #864

Closed

Description

@samualtnorman

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.

Activity

  1. boehs commented on May 4, 2023

    @boehs
    Contributor

    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.

  2. boehs commented on May 4, 2023

    @boehs
    Contributor

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

  3. boehs commented on May 4, 2023

    @boehs
    Contributor

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

  4. birkskyum commented on Jul 26, 2026

    @birkskyum
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions