Astro integration using html-minifier-next to minify HTML output during build. Version 4.0.2, requires Astro ^6.0.0 and Node >=22.13.0. Unlike other Astro HTML minifiers, it offers full configurability of html-minifier-next options and uses Lightning CSS for speed. Released under MIT license.
npm install astro-html-minifier-nextNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Astro to minify HTML with recommended html-minifier-next options.
Upgrade Astro to ^6.0.0.
Update Node.js to >=22.13.0.
Add to integrations as shown in quickstart.
Refer to html-minifier-next documentation for valid options.
Upgrade Astro to ^6.0.0.
Use `import htmlMinifier from 'astro-html-minifier-next'` (default import).
Switch to ESM imports (import statement) or use dynamic import().