A fork of html-minifier that adds basic ES6 uglification support via the minifyJS option set to 'es6'. Version 3.5.9 is the latest stable release. It includes TypeScript definitions. This package is a thin wrapper around the original html-minifier, with no active maintenance or updates expected. It allows older projects that need ES6-aware minification to continue using a familiar API, but users should consider migrating to modern alternatives like html-minifier-terser for better ES6+ support.
npm install html-minifier-es6No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minify an HTML string with ES6 JS support enabled via minifyJS option set to 'es6'.
Replace 'html-minifier-es6' with 'html-minifier-terser' and update options accordingly.
Use html-minifier-terser with minifyJS: true or a proper terser configuration.
Use `import { minify } from 'html-minifier-es6'` or `const { minify } = require('html-minifier-es6')`.Use `const { minify } = require('html-minifier-es6');`Use a newer alternative like html-minifier-terser or downgrade Node.js to < 12.
Set minifyJS to a custom uglifier (e.g., terser) instead of 'es6'.