2.0.0 • Published 8 years ago

@eventmobi/html-minifier-loader v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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
}