koa-html-minifier2
v1.0.7
Published
minify HTML responses like some crazy guy
Downloads
8
Readme
Koa HTML Minifier 2
It is the like as koajs/html-minifier, and supports koa 2.x
.
Middleware that minifies your HTML responses using html-minifier.
It uses html-minifier
'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.
Install
npm i --save koa-html-minifier2
Usage
const htmlMinifier2 = require('koa-html-minifier2')
app.use(htmlMinifier2({
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true
}))
Options
See: https://github.com/kangax/html-minifier#options-quick-reference