@nuxtjs/html-minifier
:warning: This module is experimental, try it and let us know how it performs
Last updated a year ago by atinux .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nuxtjs/html-minifier 
SYNC missed versions from official npm registry.

:warning: This module is experimental, try it and let us know how it performs

@nuxtjs/html-minifier

npm (scoped with tag) npm CircleCI

Minify the html for each request served by nuxt server (nuxt start)

:information_source: nuxt generate already has built-in support for minifying html

:fire: Using this module could be a performance hit :fire: it is recommended to only use it when you have a caching proxy in front of your Nuxt server (at least until we have benchmarks to determine the real world impact)

Usage

yarn add @nuxtjs/html-minifier OR npm i @nuxtjs/html-minifier

Add @nuxtjs/html-minifier to modules section of nuxt.config.js

{
  modules: [
    ['@nuxtjs/html-minifier', { log: 'once', logHtml: true }]
 ]
}

Options

keepTrying

  • Default: true

If false then every url which generated an error wont be minified in future requests

log

  • Default: always

  • always: always log html-minifier errors

  • once: only log html-minifier errors once for each url

  • false: never log html-minifier errors

logHtml

  • Default: false

Be wary to enable this in production, your disk could fill up quickly!

If true then the html which failed to minimize is also logged

HTML Minifier options

This module uses the build.html.minify property for configuring html minifier

Development

  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Start development server using npm run dev

License

MIT License

Copyright (c) Nuxt Community.

Current Tags

  • 0.1.2                                ...           latest (a year ago)

2 Versions

  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 10
Dependencies (3)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |