🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

html-minifier-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-minifier-webpack-plugin

A Webpack plugin to minimize HTML with HTML minifier.

latest
Source
npmnpm
Version
2.2.3
Version published
Maintainers
1
Created
Source

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)

Keywords

HTML

FAQs

Package last updated on 16 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts