A Gulp plugin wrapper around the html-minifier library for minifying HTML files. Version 1.1.11 is the latest stable release as of 2021, with minimal updates since 2016. It supports collapsing whitespace, removing comments, and other html-minifier options. The plugin adds convenience features like `ignorePath` to strip prefixes from file paths and `env` option to disable minification in development. It is a fork of the original gulp-html-minifier, providing compatibility with newer Gulp versions.
npm install gulp-html-minifier2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic Gulp task that minifies HTML files from src to dist using html-minifier with collapsed whitespace.
Check documentation for extra options like ignorePath and env.
Migrate to gulp-htmlmin or another actively maintained plugin that uses a maintained minifier.
Do not pass {env: 'development'} in production tasks.Verify the expected output paths when using ignorePath.
Run 'npm install gulp-html-minifier2 --save-dev'
Change to 'const htmlmin = require('gulp-html-minifier2');'Add 'return' before gulp.src()