{"id":40748,"library":"connect-html-minifier","title":"connect-html-minifier","description":"HTML minifier middleware for Connect/Express that automatically minifies HTML responses on the fly. Version 0.1.0 wraps kangax/html-minifier to provide configurable minification options directly as Connect middleware. Lightweight and simple to integrate, but unmaintained since 2015 with no recent releases. Alternatives include middleware like express-minify-html or direct use of html-minifier-terser.","status":"abandoned","version":"0.1.0","language":"javascript","source_language":"en","source_url":"git://github.com/neoziro/connect-html-minifier","tags":["javascript"],"install":[{"cmd":"npm install connect-html-minifier","lang":"bash","label":"npm"},{"cmd":"yarn add connect-html-minifier","lang":"bash","label":"yarn"},{"cmd":"pnpm add connect-html-minifier","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core minification library","package":"html-minifier","optional":false}],"imports":[{"note":"CJS-only; no ESM or TypeScript support","wrong":"import htmlMinifier from 'connect-html-minifier';","symbol":"default","correct":"var htmlMinifier = require('connect-html-minifier');"}],"quickstart":{"code":"var connect = require('connect');\nvar htmlMinifier = require('connect-html-minifier');\n\nconnect()\n  .use(htmlMinifier({ removeComments: true, collapseWhitespace: true }))\n  .listen(8080);\nconsole.log('Server running on port 8080');","lang":"javascript","description":"Demonstrates basic usage of connect-html-minifier as Connect middleware with minification options."},"warnings":[{"fix":"Consider using express-minify-html or html-minifier-terser with custom middleware.","message":"Package has not been updated since 2015 and is considered abandoned.","severity":"deprecated","affected_versions":"all"},{"fix":"Pin html-minifier version or use a dedicated minification middleware.","message":"Requires html-minifier as a peer dependency, which may have breaking changes.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.0':19 '2015':39 'altern':44 'automat':11 'configur':24 'connect':2,29 'connect-html-minifi':1 'connect/express':9 'direct':27,53 'express':49 'express-minify-html':48 'fli':17 'html':3,5,13,51,57 'html-minifier-ters':56 'includ':45 'integr':35 'javascript':60 'kangax/html-minifier':21 'lightweight':31 'like':47 'middlewar':7,30,46 'minif':25 'minifi':4,6,12,50,58 'option':26 'provid':23 'recent':42 'releas':43 'respons':14 'simpl':33 'sinc':38 'terser':59 'unmaintain':37 'use':54 'version':18 'wrap':20","created_at":"2026-06-04T18:49:04.786821+00:00","updated_at":"2026-06-04T18:49:04.786821+00:00","problems":[{"fix":"Run `npm install connect-html-minifier`.","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'connect-html-minifier'"},{"fix":"Use `const htmlMinifier = require('connect-html-minifier');`","cause":"Incorrect import style (ESM import used for CJS module).","error":"TypeError: htmlMinifier 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/neoziro/connect-html-minifier","github":"git://github.com/neoziro/connect-html-minifier","docs":null,"changelog":null,"pypi":null,"npm":"connect-html-minifier","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}}