@eventmobi/html-minifier-loader
v2.0.0
Published
Webpack loader that minifies HTML by [html-minifier](https://github.com/kangax/html-minifier)
Downloads
7
Readme
html-minifier-loader
Webpack loader that minifies HTML by html-minifier. If you wish to use minimize, please use html-minify-loader.
Installation
npm install html-minifier-loader html-minifier
Example of webpack.config.js
You can pass html-minifier parameters by 'html-minifier-loader' property.
The default is {removeComments: true, collapseWhitespace: true}
.
module: {
loaders: [
{ test: /\.html$/,
loader: 'raw!html-minifier'
}
]
},
'html-minifier-loader': {
removeComments: false,
collapseWhitespace: true,
conservativeCollapse: true,
preserveLineBreaks: true
}