Grunt plugin
I was wondering, would it be possible to add a grunt plugin?
grunt-contrib-htmlmin is using html-minifier right now.
html-minifier-terser is an independent library for compressing html code.
From my side there are no plans to create a plugin for grunt, gulp, webpack, rollup and so on. The adoption of html-minifier-terser should happen in the relevant ecosystems and by other maintainers.
It is almost 6 years since I have used grunt for the last project and all newer projects used webpack. Personally I could not maintain a grunt plugin.
So maybe you can propose html-minifier-terser to the maintainers of grunt-contrib-htmlmin.
The mentioned plugin is already linked at https://github.com/terser/html-minifier-terser#nodejs
Since html-minifier-terser is a direct fork of html-minifier, it should be possible for the grunt plugin maintainers to easily migrate to the new solution.
I understand your point of view, believe me :)
That being said, I have push rights to the grunt-contib-htmlmin plugin repo.
I'm not sure if we could follow the approach of making html-minifier/html-minifier-terser a peer dependency or someone could release a new fork.
I can not really follow. peerDependencies are not meant to be like this (also not everyone uses npm >= 7). Even html-webpack-plugin uses html-minifier-terser as normal dependency. Multiple packages which depend on html-minifier-terser make not much sense in a single project.
And why a fork if you have push rights to the mentioned repo?