@liamnewmarch/static-plugin-html-minifier

Static plugin to add support for HTMLMinifier

Usage no npm install needed!

<script type="module">
  import liamnewmarchStaticPluginHtmlMinifier from 'https://cdn.skypack.dev/@liamnewmarch/static-plugin-html-minifier';
</script>

README

HTMLMinifier plugin for Static

This plugin adds HTMLMinifier support to Static.

Usage

First, install Static and this plugin

npm install @liamnewmarch/static @liamnewmarch/static-plugin-html-minifier

Next add the plugin in your static.config.js

import minifier from '@liamnewmarch/static-plugin-html-minifier';

export default {
  // Other Static options here (optional)
  plugins: [
    minifier({
      // Plugin options here (optional)
    }),
  ],
}

Options

The HTMLMinifier plugin is a function which can take an optional options object. See the HTMLMinifier options quick reference.