rollup-plugin-html-minifier
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

rollup-plugin-html-minifier

This plugin minifies html files in rollup bundle with html-minifier.

Install

yarn add rollup-plugin-html-minifier --dev

or

npm install rollup-plugin-html-minifier -D

Usage

rollup.config.js

import htmlMinifier from 'rollup-plugin-html-minifier'

export default {
  // ...
  plugins: [
    htmlMinifier({
      // These are the defaults values:

      // Glob pattern or array of glob patterns to include
      include: '*.html',

      // Glob pattern or array of glob patterns to exclude
      exclude: undefined,

      // Method returning a boolean that filters files to process
      // given their name (overrides include and exclude parameters)
      filter: undefined, 

      // html-minifier options
      options: {}
    })
  ]
}

Most of the html-minifier options are disabled by default. You need to set some of them to get an actual minification. See html-minifier options.

Readme

Keywords

none

Package Sidebar

Install

npm i rollup-plugin-html-minifier

Weekly Downloads

67

Version

2.0.0

License

MIT

Unpacked Size

4.85 kB

Total Files

6

Last publish

Collaborators

  • juliendargelos