Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.72 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.72 KB

Koa HTML Minifier

Middleware that minifies your HTML responses using html-minifier-terser. It uses html-minifier-terser's default options which are all turned off by default, so you have to set the options otherwise it's not going to do anything.

NPM version Build status Test coverage License

Install

# npm ..
npm i koa-html-minifier
# yarn ..
yarn add koa-html-minifier

API

// do compression stuff first
app.use(require('koa-compress')());

// then use this minifier
app.use(require('koa-html-minifier')({
  collapseWhitespace: true
}));

Options

See: https://github.com/DanielRuf/html-minifier-terser#options-quick-reference

Contributors

Name Website
Jonathan Ong http:https://jongleberry.com
Imed Jaberi https://www.3imed-jaberi.com/
João Carmona