gulp-htmlmin icon indicating copy to clipboard operation
gulp-htmlmin copied to clipboard

Move to html-minifier-terser to support ES6 🔧

Open rodrigograca31 opened this issue 5 years ago • 6 comments

As debated in this thread html-minifier is using uglify-js which doesnt support ES6, so if you have any ES6 in your HTML it doesnt compress it.

This new fork created by @DanielRuf changes uglify-js to the latest terser version.

This change is really need nowadays since if you include even 1 line of ES6 the whole JS does not compress.

P.S. I can send another PR bumping this package version if you want. (Nothing should break but since this is a big change I would bump to 6.0.0)

rodrigograca31 avatar Nov 07 '19 23:11 rodrigograca31

Seems tests failed because terser only supports node 6 and up

"engines": {
    "node": ">=6.0.0"
  },

I will add that requirement and change travis build to test only on 6 and above

rodrigograca31 avatar Nov 08 '19 15:11 rodrigograca31

That requirement already existed, but Travis was building for non supported node versions.... 🤦

rodrigograca31 avatar Nov 08 '19 15:11 rodrigograca31

sorry for the delay, and thanks for the PR. We'll review and merge ASAP!

jonschlinkert avatar Nov 26 '19 02:11 jonschlinkert

Cool! Looking forward to it.

On Tue, Nov 26, 2019 at 2:44 AM Jon Schlinkert [email protected] wrote:

sorry for the delay, and thanks for the PR. We'll review and merge ASAP!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonschlinkert/gulp-htmlmin/pull/104?email_source=notifications&email_token=AAIU5ZSGJS7V36X57YGUY4TQVSEQHA5CNFSM4JKP2JH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFEQLDQ#issuecomment-558433678, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIU5ZVM4R34CXVOJQ6776TQVSEQHANCNFSM4JKP2JHQ .

-- Rodrigo Graça.

rodrigograca31 avatar Nov 26 '19 13:11 rodrigograca31

@jonschlinkert Hi, is there any hope this will be merged?

rarous avatar Jan 28 '20 12:01 rarous

Hey!

Seems the webpack team just released version 4 using html-minifier-terser https://github.com/jantimon/html-webpack-plugin/releases/tag/v4.0.0

It would be good if we could merge this PR and also use html-minifier-terser

Thanks! :heart:

rodrigograca31 avatar Mar 23 '20 12:03 rodrigograca31