html-minifier-loader

1.4.1 • Public • Published

html-minifier-loader NPM version

Webpack loader that minifies HTML by html-minifier.

Installation

npm install html-minifier html-minifier-loader --save

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-loader!html-minifier-loader'
        }
    ]
},
'html-minifier-loader': {
    removeComments: false,
    collapseWhitespace: true,
    conservativeCollapse: true,
    preserveLineBreaks: true
}

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i html-minifier-loader

    Weekly Downloads

    1,140

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    3.21 kB

    Total Files

    4

    Last publish

    Collaborators

    • sapics