html-minifier icon indicating copy to clipboard operation
html-minifier copied to clipboard

How to pass `CleanCSS` options via `minifyCSS`?

Open john-doherty opened this issue 3 years ago • 1 comments

I'm trying to pass Clean CSS options via the minifyCSS property, according to the docs, I should be able to pass:

minifyCSS: {
    format: {
        semicolonAfterLastProperty: false
    }
}

But it has not affect. What am I missing?

john-doherty avatar Feb 13 '23 02:02 john-doherty

If of interest, HTML Minifier Next (compatible successor project) uses Lightning CSS which should make such fine-tuning easy. See e.g. the docs in the HMN repo.

j9t avatar Nov 26 '25 15:11 j9t