Jens Oliver Meiert

Use my latest work: latest tech book · latest non-tech book · latest optimization tool · latest defense tool

HTML Minifier Next 7 Is ESM-Only

Published on Jun 15, 2026, filed under , , , , . (Share this post, e.g., on Mastodon.)

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

Portrait sketch of Jens Oliver Meiert.

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 manager at various companies (e.g., Google); I’m an active web and tool developer (code optimization, digital defense), a contributor to web standards (like HTML, CSS, WCAG), and a book author (O’Reilly, Frontend Dogma). Stay in touch.