Closed yrtimiD closed 4 years ago
Hi @yrtimiD,
the difference is that html-minifier-terser uses terser instead of uglify-js to support ES6 and newer.
See https://github.com/DanielRuf/html-minifier-terser/compare/v4.0.0...master and https://github.com/kangax/html-minifier/issues/1040 to understand the motivation behind this.
It has to do with the fact that the maintainer of html-minifier is also the maintainer of ugligy-js and he was not interested to move to terser which works (unlike uglify-es).
Will be nice to have this explanation in the README.md
I think the addition in the package name is sufficient. It is a direct replacement.
PRs for the README.md file are very welcome.
Closing as obsolete as in my opinion the fork with terser is the current maintained solution and supports modern JavaScript. As terser was forked from uglify-es and the API is (mostly) the same there is not much to document.
It was neither obvious to me that this is the maintained solution, nor why using terser would be better. You assume a lot of knowledge here that most developers will not have.
I specifically seached the issues and after reading this, will replace my current usage of html-minifier
with this package.
I'd strongly suggest documenting this visibly in the README
.
It's not very clear what is the difference between this project and original html-minifier. Adding some motivations and explanations to the readme will help understand and do the switch.