NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4953 most downloaded on npm
Highly configurable, well-tested, JavaScript-based HTML minifier.
Last release 8 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 5 months
Most releases are documented
notes for 52 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
80 releases · first in 2011
handle custom fragments within CSS/JS correctly (#1001, #1015)
continueOnParseError to treat invalid characters as text (#1004)commander 2.19.0grunt-contrib-uglify 4.0.1gruntify-eslint 5.0.0uglify-js 3.5.1p.a{color:red}p.b{color:red} becomes p.a,p.b{color:red})white becomes #fff)url("image.png") becomes url(image.png))::before becomes :before)level, compatibility, format) are no longer supportedminifyCSS option configuration has changed. Lightning CSS options differ from clean-css options. When passing an object to minifyCSS, use Lightning CSS configuration options:
targets: Browser targets for vendor prefix optimization (e.g., { chrome: 95, firefox: 90 })unusedSymbols: Array of CSS identifiers to remove during minificationerrorRecovery: Boolean to skip invalid CSS rules (disabled in Lightning CSS, but enabled by default in HMN)sourceMap: Boolean to generate source mapsIf you were passing configuration options to minifyCSS, review Lightning CSS documentation and update your configuration:
// Before (clean-css)
minify(html, {
minifyCSS: {
level: 2,
compatibility: 'ie8'
}
});
// After (Lightning CSS)
minify(html, {
minifyCSS: {
targets: { ie: 11, chrome: 95, firefox: 90 } // Browser targets object
}
});
To disable error recovery for strict CSS validation:
minify(html, {
minifyCSS: {
errorRecovery: false // Disable error recovery (enabled by default in HMN)
}
});
If you rely on specific CSS output formatting, review your CSS after upgrading as selector order and formatting may change due to better optimization.
One column per quarter.
Nothing published for this version
handle custom fragments inside CSS more gracefully (#928, #929, #950)
clean-css 4.2.1commander 2.17.1handle maxLineLength precisely around custom fragments & <!-- htmlmin:ignore --> (#930, #945)
maxLineLength precisely around custom fragments & <!-- htmlmin:ignore --> (#930, #945)https:// in documentation (#943)<!doctype html> for compressibility (#822, #944)fix DOCTYPE parsing (#938, #939)
--minify-urlscommander 2.16.0### Improvements - upgrade to uglify-js 3.4.2
uglify-js 3.4.2handle empty class attributes (#921, #922)
class attributes (#921, #922)supply context to minifyCSS custom processor
minifyCSS custom processor (#909)options (#910)grunt-browserify 5.3.0preserve whitespace around (#904, #905)
<ruby> (#904, #905)### Bug fixes - fix race in QUnit web test (#899) ### Improvements - reduce dependencies
fix corner case in decodeEntities (#893, #894)
decodeEntities (#893, #894)allow disabling of default flags on CLI (#860, #892)
handle ol & ul as non-phrasing content (#888, #889)
ol & ul as non-phrasing content (#888, #889)fix corner cases in collapseWhitespace (#878, #883)
collapseWhitespace (#878, #883)commander 2.14.1### Improvements - upgrade to uglify-js 3.3.1 - migrate from qunitjs to qunit
uglify-js 3.3.1qunitjs to qunitparse option element correctly (#866, #869)
option element correctly (#866, #869)chalk 2.3.0commander 2.12.1uglify-js 3.2.0correctly parse HTML4 nested inline elements (#857, #861)
upgrade to grunt-contrib-uglify 3.1.0
grunt-contrib-uglify 3.1.0upgrade to grunt-browserify 5.2.0
chalk 2.1.0grunt-browserify 5.2.0uglify-js 3.1.0cli does not override input file correctly (#829, 471f9f28173841f2d4b383d5b9dd963a51b21b32)
chalk 2.0.1commander 2.11.0gruntify-eslint 4.0.0propagate blocking of collapseWhitespace to inner elements
collapseWhitespace to inner elements (#817)improve usability of canCollapseWhitespace & canTrimWhitespace
canCollapseWhitespace & canTrimWhitespace (#813)upgrade to grunt-contrib-uglify 3.0.0
clean-css 4.1.2grunt-contrib-uglify 3.0.0uglify-js 3.0.5fix sortClassName on custom fragments (#805, #807)
sortClassName on custom fragments (#805, #807)upgrade to grunt-contrib-uglify 2.3.0
grunt-contrib-uglify 2.3.0progress 2.0.0uglify-js 2.8.22fix crash when specific class names are used with sortClassName (#794, #795)
sortClassName (#794, #795)fix minifyJS on event attributes (#792, #793)
### Improvements - upgrade to uglify-js 2.8.0
uglify-js 2.8.0 (#789)handle better in collapseWhitespace
better in collapseWhitespace (#785)handle whitespace around correctly (#777, #784)
preserve non-breaking spaces during collapseWhitespace (#777, #780)
collapseWhitespace (#777, #780)### Improvements - upgrade to clean-css 4.0.0
clean-css 4.0.0 (#772)retain attribute quotes around values containing custom fragments (#757, #760)
Added search and selectedcontent elements to HTML element registry for complete minification support and proper optional tag removal
search and selectedcontent elements to HTML element registry for complete minification support and proper optional tag removalfix backreferences usage in ignoreCustomFragments (#733, #738)
ignoreCustomFragments (#733, #738)handle line-breaks around custom fragments gracefully (#719, #720)
collapseWhitespace with trimCustomFragments (#722, #723)--dry/-d flag for dry run mode to process and report statistics without writing output files-o, --output flag, to clarify what it does and how it works-o file streams, skipping symlinks and the output subtree in directory mode, and handling EPIPE-o flag combinations, dry run error handlingmaxInputLength security option, CSS/JS error handling, <dialog> and <search> elementscollapseWhitespace removes attribute whitespaces in (#713, #715)
collapseWhitespace removes attribute whitespaces in <wbr> (#713, #715)removeComments overrides htmlmin:ignore sometimes (#696, #699)
removeComments overrides htmlmin:ignore sometimes (#696, #699)cli does not process subdirectories when --file-ext is specified (#686, #687)
--input-dir no long creates empty subdirectories (#688)support selective batch processing with --file-ext (#665, #680)
--file-ext (#665, #680)removeRedundantAttributes option now removes significantly more HTML default attribute values. This will result in more aggressive minification when this option is enabled, which may change existing output—keep an eye on CSS selectors, JavaScript queries, and tooling requirements. Newly removed default values include:
autocorrect="on", fetchpriority="auto", loading="eager", popovertargetaction="toggle"<button type="submit">, <form enctype="application/x-www-form-urlencoded">, <form method="get"> (both previously supported, now reorganized), <html dir="ltr">, <img decoding="auto">, <input colorspace="limited-srgb">, <input type="text"> (previously supported, now reorganized), <marquee behavior="scroll">, <marquee direction="left">, <style media="all">, <textarea wrap="soft">, <track kind="subtitles">fix whitespace interactions between minifyCSS and collapseWhitespace (#664, #676)
node:test runnerspaces are removed around (#666, #673)
<wbr> (#666, #673)dialog and search elements to <p> end tag omission rules per current HTML specification<ruby>, <rp>, <rt>, <rb>, <rtc>removeOptionalTags and collapseWhitespace options are enabledoptionalEndTag tracking through collapsible whitespace (unless conservativeCollapse is enabled)### Improvements - update to qunit 2.0.0
qunit 2.0.0 (#672)<tfoot> and <tbody> elements breaking HTML structure in nested tables, by ensuring table element closing only occurs within the current table scope### Improvements - update to change-case 3.0.0 - update to minimize 2.0.0
change-case 3.0.0minimize 2.0.0### Improvements - update to he 1.1.0
he 1.1.0command-line tool not working under Node.js 0.10 (#653, #654)
conservativeCollapse & preserveLineBreaks (#652, #655)degraded performance when sortAttributes or sortClassName is used
sortAttributes or sortClassName is used (#651)collapseWhitespace causes whitespace to shift around htmlmin:ignore (#641, #644)
collapseWhitespace causes whitespace to shift around htmlmin:ignore (#641, #644)prepare script to configure Git hooks path automaticallycommitlint-config-non-conventional dependencyincludeAutoGeneratedTags & removeOptionalTags removes meaningful content (#627, #629)
includeAutoGeneratedTags & removeOptionalTags removes meaningful content (#627, #629)benchmark.js uses live web sites as input (#612, #617)collapseWhitespace support for <nobr> (#628, #630)collapseWhitespace now handles inter-tag trailing whitespace (#631)options.lint migrates to HTMLLint (#80, #633)@eslint/js to development dependencies for improved lintingHTMLtoXML and HTMLtoDOM functions from the public API; these XML-related functions were outdated and no longer relevant to the library’s focus on HTML minificationHTMLtoXML, HTMLtoDOM)is-ci, lint-stagedquote character of attribute with empty string value is parsed incorrectly (#603, #605)
sortAttributes reorders attributes for optimal compression (#4, #594, #613)sortClassName recorders style classes for optimal compression (#267, #597, #613)removeScriptTypeAttributes and removeStyleLinkTypeAttributes cover wider range of cases (#607)decodeEntities minifies HTML Entity Characters (#75, #472, #608)some inline tags have significant trailing whitespaces removed by collapseWhitespace (#581, #583)
collapseWhitespace (#581, #583)remove{Comments,CDATASections}FromCDATA (#579, #586)behaviour mismatch on phrasing-content-only tags against web browsers (#557, #558, #559, #562, #565, #566, #577, #578)
cli.js does not throw Error object (#564)cli.js ignores -o <file> when reading from STDIN (#561)htmlmin:ignore & collapseWhitespace gives erroneous output (#572, #574)webpack cannot process html-minifier sources due to require() usage (#568)collapseWhitespace removes significant whitespace around font icons (#571)processConditionalComments to control minification of IE conditional comments (#563, #567)extraneous whitespace inserted by ignoreCustomFragments (#502, #505, #506, #509, #513, #545, #552)
ignoreCustomFragments (#502, #505, #506, #509, #513, #545, #552)removeOptionalTags on empty element crashes (#500, #508)HTMLParser halts on malformed markups (#177, #332, #507, #510, #512, #542)removeComments would give incorrect result if comment matches ignoreCustomFragments (#511, #515)removeOptionalTags too aggressive around non-HTML tags (#503, #514)collapseWhitespace within inline tags (#519)removeTagWhitespace does not work on the web (#528)cli cannot handle nested directories (#532, #533)removeEmptyElements always remove <iframe>, <audo> & <video> (#536, #538, #539)minifyJS does not work the same way on the web (#531)collapseWhitespace around comments and removeEmptyElements (#525)<script type="..."> (#521)jscs & jshint to eslint (#554)grunt test to cover browser tests (#537)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →