HTML Minifier Next 5, a Quick Upgrade Guide
Published on Feb 2, 2026, filed under development, html, optimization. (Share this post, e.g. on Mastodon or on Bluesky.)
The next major release of HTML Minifier Next (HMN) just shipped, and contrary to previous major releases, this one comes with quite a few breaking DX and UX improvements.
To make it easier to work through the breaking changes, here’s a quick checklist:
File extensions: If you do not limit the file types passed to HMN and you use HMN on files other than .html, .htm, .xhtml, or .shtml, you need to either enable the specific file types you use, or enable all file types (
fileExt: "*"or--file-ext='*').“HTML 5” mode: If you explicitly used the
html5option (html5or--no-html5), you should remove it—this mode is always on now and cannot be disabled.Sorting by class names: If you sort by class names, you need to rename the parameter to use the plural (
sortClassNamesor--sort-class-names).URL minification configuration: If you use a custom configuration for
minifyURLs, you need to remove unsupported properties (onlysiteis accepted with the updated configuration).
Depending on your preferences:
Presets: If you care about the output of presets, check the output and explicitly enable missing or disable unwanted settings (the presets were optimized for an improved—though opinionated—starter and expert experience).
Auto-generated tags: If you rely on certain tags that were inserted in the past, you need to enable
includeAutoGeneratedTags(includeAutoGeneratedTags: trueor--include-auto-generated-tags).
For additional details, please check the changelog. If you run into any problems, please file an issue.
The update contains a few more improvements around security, performance, and developer experience, and should form an even better foundation to extend HMN further.
Stay tuned—and if you like the project as a powerful HTML optimization tool, spread the word and consider supporting the work on it! Thanks!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a senior engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager for companies you use every day and companies you’ve never heard of, I’m an occasional 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 in philosophy. Here on meiert.com I share some of my experiences and perspectives. (I value you being critical, interpreting charitably, and giving feedback.)
