{"library":"express-minify-html","type":"library","category":null,"description":"express-minify-html is an Express middleware designed to automatically minify HTML responses generated by `res.render` calls. It leverages the robust `html-minifier` library under the hood, passing configuration options directly to it. The current stable version is 0.12.0. While there's no stated release cadence, its versioning suggests a pre-1.0 status, implying potential API changes in minor versions. A key differentiator is its seamless integration with Express's existing `res.render` function, with an option to `override` it directly or expose a new `res.renderMin` method. It also supports `exception_url` configurations, allowing developers to selectively bypass minification for specific routes using strings, regular expressions, or custom functions. This helps optimize performance by reducing HTML payload size for most requests without affecting critical or dynamic paths that might be sensitive to minification.","language":"javascript","status":"active","version":"0.12.0","tags":["javascript","express","html","minifier","middleware","minify"],"last_verified":"Wed May 27","install":[{"cmd":"npm install express-minify-html","imports":["const minifyHTML = require('express-minify-html');","app.use(minifyHTML({ /* options */ }));"]},{"cmd":"yarn add express-minify-html","imports":[]},{"cmd":"pnpm add express-minify-html","imports":[]}],"homepage":null,"github":"https://github.com/melonmanchan/express-minify-html","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/express-minify-html","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/express-minify-html/compatibility"}}