HTML Minifier Next 7 Is ESM-Only
Published on Jun 15, 2026, filed under tools, development, html, performance, optimization. (Share this post, e.g., on Mastodon or on Bluesky.)
HTML Minifier Next 7 is out—and the title gives it away, it drops support for CommonJS and is ESM-only now.
The update includes another breaking though very specific change:
removeStyleLinkTypeAttributes and removeScriptTypeAttributes have been so closely related (in spirit), they were merged into one option, removeDefaultTypeAttributes.
In CommonJS environments on Node.js older than 22, keep using HTML Minifier Next 6—I don’t maintain old versions, but HMN 6 has been regularly updated and is still in good shape (from all I know 🙂).
For the type-related changes, no action is needed if you don’t use either option; preset output is not affected, as both the conservative and the comprehensive preset had the two options enabled.
(The update includes a few more improvements, but these are the two most important ones.)
As always, if you run into any problem (or have an idea for a feature), report it in the HTML Minifier Next repo. Cheers!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager at various companies, including Google; I’m an open-source developer and a contributor to web standards (like HTML, CSS, WCAG); and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also with respect to politics and philosophy. Here on meiert.com I talk about some of my experiences and perspectives. (Please share feedback—interpret charitably, keep it friendly, but do be critical.)
