{"id":41246,"library":"html-minifier-stream","title":"html-minifier-stream","description":"Stream interface for html-minifier (v3.x), enabling piping of HTML data through a transform stream for minification. Created by gomoto, this package provides a simple way to integrate html-minifier into Node.js stream pipelines. Current version 0.1.0, with no active maintenance since 2016. Alternative to using html-minifier directly with buffers or strings.","status":"deprecated","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/gomoto/html-minifier-stream","tags":["javascript"],"install":[{"cmd":"npm install html-minifier-stream","lang":"bash","label":"npm"},{"cmd":"yarn add html-minifier-stream","lang":"bash","label":"yarn"},{"cmd":"pnpm add html-minifier-stream","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency that provides minification logic; peer dependency at version 3.x","package":"html-minifier","optional":false}],"imports":[{"note":"No ESM exports; the module is CJS only.","wrong":"const htmlMinifierStream = require('html-minifier-stream')","symbol":"htmlMinifierStream","correct":"import htmlMinifierStream from 'html-minifier-stream'"},{"note":"The package exports a single function, not an object.","wrong":"const { htmlMinifierStream } = require('html-minifier-stream')","symbol":"default export","correct":"const htmlMinifierStream = require('html-minifier-stream')"},{"note":"Options are passed directly to the function call; there is no separate factory method.","wrong":"const stream = require('html-minifier-stream').createStream({})","symbol":"options","correct":"const stream = require('html-minifier-stream')({ removeComments: true, collapseWhitespace: true })"}],"quickstart":{"code":"const fs = require('fs');\nconst htmlMinifierStream = require('html-minifier-stream');\n\nconst options = {\n  removeComments: true,\n  collapseWhitespace: true,\n  removeAttributeQuotes: true\n};\n\nfs.createReadStream('index.html')\n  .pipe(htmlMinifierStream(options))\n  .pipe(fs.createWriteStream('minified.html'))\n  .on('finish', () => console.log('Minification complete'));","lang":"javascript","description":"Shows how to pipe an HTML file through the minifier stream and output to a new file."},"warnings":[{"fix":"Consider using html-minifier directly or find an alternative active package.","message":"Package is unmaintained since 2016. html-minifier v3.x is old; newer versions may have breaking changes.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Use html-minifier@3.x or switch to another solution.","message":"Requires html-minifier@3.x as peer dependency; incompatible with html-minifier v4+.","severity":"breaking","affected_versions":"0.1.0"},{"fix":"Ensure your source stream emits buffers or strings; use .toString() if needed.","message":"The stream does not support object mode; it expects string/buffer input only.","severity":"gotcha","affected_versions":"0.1.0"}],"env_vars":null,"search_vec":"'0.1.0':43 '2016':49 'activ':46 'altern':50 'buffer':58 'creat':23 'current':41 'data':16 'direct':56 'enabl':12 'gomoto':25 'html':2,9,15,35,54 'html-minifi':8,34,53 'html-minifier-stream':1 'integr':33 'interfac':6 'javascript':61 'mainten':47 'minif':22 'minifi':3,10,36,55 'node.js':38 'packag':27 'pipe':13 'pipelin':40 'provid':28 'simpl':30 'sinc':48 'stream':4,5,20,39 'string':60 'transform':19 'use':52 'v3.x':11 'version':42 'way':31","created_at":"2026-06-04T18:51:28.867971+00:00","updated_at":"2026-06-04T18:51:28.867971+00:00","problems":[{"fix":"Run 'npm install html-minifier-stream' and ensure package.json includes it.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'html-minifier-stream'"},{"fix":"Pass an options object, even if empty: htmlMinifierStream({})","cause":"Called htmlMinifierStream() without arguments or with non-object.","error":"Invalid transform stream: options must be an object"},{"fix":"Use 'const htmlMinifierStream = require('html-minifier-stream')' and call it as a function.","cause":"Incorrect import (destructured) when using CommonJS.","error":"htmlMinifierStream is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/gomoto/html-minifier-stream#readme","github":"https://github.com/gomoto/html-minifier-stream","docs":null,"changelog":null,"pypi":null,"npm":"html-minifier-stream","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}