A webpack loader that minifies HTML files using html-minifier. Version 1.0.2 is the latest and only release. It applies html-minifier options via webpack config under 'htmlmin-loader' key. Minimal features: no caching, no source maps. Alternatives like html-loader with minimize options are more actively maintained.
npm install htmlmin-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures webpack to minify all .html files using htmlmin-loader with common html-minifier options.
Set 'htmlmin-loader' key at config root level, e.g. { 'htmlmin-loader': { removeComments: true } }Use webpack 2+ 'rules' array with 'loader' property
Use 'devtool' in webpack config and consider alternative loaders if source maps needed
Explicitly set html-minifier options to preserve needed content, e.g. ignoreCustomFragments
Manually declare module or use // @ts-ignore
Run 'npm install html-minifier --save-dev'
Verify html-minifier is installed and version >= 1.0.0
Use 'loaderOptions' in rule or switch to a loader that supports webpack 5
Move 'htmlmin-loader' options to root of webpack config