Node.js transform stream for minifying HTML using html-minifier. Version 2.0.0 allows streaming HTML documents and passes options directly to html-minifier. Ideal for build pipelines where HTML content is streamed from files or other streams. Does not buffer entire input, enabling low-memory processing of large HTML files. Note that html-minifier is not a pure stream; the stream collects input and processes it on end, but at least it handles backpressure. Primary differentiator from other minification libraries is its streaming interface for Node.js.
npm install html-minify-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a read stream from index.html, pipes through minification, writes to dist/index.html
Expect the entire output at once; do not consume chunk by chunk.
Refer to html-minifier documentation for supported options.
Consider switching to a more actively maintained alternative.
Use require('html-minify-stream') instead of import.Run npm install html-minify-stream in your project directory.
Ensure the upstream stream emits strings or Buffers. Use fs.createReadStream with encoding or set encoding on stream.