Skip to content

frontendista/html-minifier-terser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@frontendista/html-minifier-terser

HTML minifier that uses LightningCSS and ESBuild for minification.

Installation

pnpm install @frontendista/html-minifier-terser

Usage

import { Minifier } from "@frontendista/html-minifier-terser"

const minifier = new Minifier()
.withHTMLOptions({
    // Override the default Terser options.
})
.withCSSOptions({
    // Override the default LightningCSS options.
});
.withJSOptions({
    // Override the default ESBuild options.
});

const minifiedHTML = minifier.minify("")