Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

guillaumejchauveau/html-minifier-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)