1.0.0 • Published 5 years ago

html-change-extension-plugin v1.0.0

Weekly downloads
26
License
ISC
Repository
-
Last release
5 years ago

HtmlChangeExtensionPlugin

Installation

with yarn yarn add html-change-extension-plugin lodash

with npm npm install html-change-extension-plugin lodash --save

Include in your project

const HtmlChangeExtensionPlugin = require('html-change-extension-plugin');

plugins: [
  new CompressionPlugin(
      {
        algorithm: 'gzip',
        threshold: 10240,
        deleteOriginalAssets: true,
      }
    ),
    new HTMLWebpackPlugin(
      {
        template: './public/index.html',
        filename: './views/index.html',
      }
    ),
    new HtmlChangeExtensionPlugin(
      {
        /**
         * These are the extensions of files that
         * will be changed after html is processed.
         */
        extensions: ['js', 'css'],
        /**
         * Extension of the compression method.
         * 'gz' by default
         */
        compressionMethod: 'gz',
      }
    ),
]