koa-html-minifier2

1.0.7 • Public • Published

Koa HTML Minifier 2

License MIT Build Status Coverage Status NPM Version NPM Download

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

Readme

Keywords

none

Package Sidebar

Install

npm i koa-html-minifier2

Weekly Downloads

7

Version

1.0.7

License

MIT

Last publish

Collaborators

  • weiyou