An open API service indexing awesome lists of open source software.

https://github.com/frontendista/html-minifier-terser

HTML minifier that uses LightningCSS and ESBuild
https://github.com/frontendista/html-minifier-terser

minify-html

Last synced: over 1 year ago
JSON representation

HTML minifier that uses LightningCSS and ESBuild

Awesome Lists containing this project

README

          

# @frontendista/html-minifier-terser

HTML minifier that uses LightningCSS and ESBuild for minification.

# Installation

```sh
pnpm install @frontendista/html-minifier-terser
```

# Usage

```ts
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("")
```