A streaming HTML minifier for Node.js that transforms a stream of HTML by stripping whitespace and comments, reducing payload size. Version 0.3.1 is the latest release with limited cadence. It operates as a stream Transform, processing data chunk by chunk, making it suitable for server responses or file streaming. Key differentiators: streaming vs buffer-based minifiers, conservative whitespace removal to avoid breaking layout, and simple configuration options.
npm install minify-html-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a simple HTTP server that streams a minified HTML file using the Minifier transform stream.
Consider using a non-streaming minifier like html-minifier for more aggressive optimization.
Ensure the minifier is placed before compression in the pipeline.
Use the 'trimElements' option with caution or pre-process those tags separately.
Use named import: import { Minifier } from 'minify-html-stream'Ensure the source stream emits strings or Buffers; use encoding if needed.
No dependency data recorded yet.