Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

html-minifier-webpack-plugin

2.0.0 • Public • Published

HTMLMinifier Webpack Plugin

A Webpack plugin to minimize HTML files.

What does the plugin do?

It will search for HTML files during the Webpack build and will minimize the HTML with HTMLMinifier.

Configuration:

The plugin pass the configuration to HTMLMinifier, defaults to {}.

Example:

var HtmlMinifierPlugin = require('html-minifier-webpack-plugin');
module.exports = {
    module: {
        loaders: [
            { test: /\.html$/, loaders: ['file-loader?name=[name].html', 'extract-loader', 'html-loader'] }
        ]
    },
    plugins: [
        new HtmlMinifierPlugin({
            // HTMLMinifier options
        })
    ]
}

License

MIT (http://www.opensource.org/licenses/mit-license.php)

install

npm i html-minifier-webpack-plugin

Downloadsweekly downloads

256

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability