A Gulp plugin for minifying HTML files using html-minifier (v5.0.1, last updated 2018). It wraps the popular html-minifier library, providing a simple way to integrate HTML minification into Gulp build pipelines. Supports all html-minifier options such as collapseWhitespace, removeComments, minifyCSS, and more. The plugin is stable but currently in maintenance mode with no recent updates; users may consider alternatives like gulp-html-minifier-terser or direct use of html-minifier-terser for newer features.
npm install gulp-htmlminNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Gulp task that minifies all HTML files from src/ to dist/ using common html-minifier options.
Switch to gulp-html-minifier-terser or use html-minifier-terser directly.
Review html-minifier docs and test pages with various options like collapseWhitespace: true.
Set minifyCSS/minifyJS to false if inline sections contain sensitive or dynamic code.
Run 'npm install gulp-htmlmin --save-dev'
Use 'const htmlmin = require('gulp-htmlmin');' instead of destructuring.Ensure the task function returns the stream: 'return gulp.src(...).pipe(htmlmin())...'