PostHTML plugin that wraps HTMLMinifier to minify HTML output in PostHTML processing pipelines. Current stable version is 0.1.0, released in 2016 with no recent updates. It leverages HTMLMinifier's options for removing comments, collapsing whitespace, and other HTML optimizations. Differentiator: integrates seamlessly with PostHTML transformations, allowing minification as a final step without an extra tool.
npm install posthtml-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies HTML by removing comments and collapsing whitespace using PostHTML pipeline.
Switch to actively maintained alternatives like 'html-minifier-terser' combined with PostHTML manual call.
Explicitly set options like removeComments: true, collapseWhitespace: true, etc.
Use compatible html-minifier version (<=4.0.0) or lock dependency.
Use: import minifier from 'posthtml-minifier' (no braces).
Run: npm install html-minifier
Pin html-minifier to version ^4.0.0 in package.json.