danurbanowicz / eleventy-netlify-boilerplate

A template for building a blog with the Eleventy static site generator and Decap CMS
https://eleventy-netlify-boilerplate.netlify.app/
MIT License
528 stars 183 forks source link

Use minifyCSS and minifyJS options in html-minifier instead? #65

Closed anghelos closed 3 years ago

anghelos commented 3 years ago

I noticed that html-minifier includes both clean-css and UglifyJS, which can be turned on with an option. Wouldn't doing all of this in a single pass improve build time?

danurbanowicz commented 3 years ago

This is an interesting question. Do you have any test results comparing both methods that you can share e.g. build stats from 11ty DEBUG? It’d be interesting to see if there is much of a difference.

anghelos commented 3 years ago

I have to admit I'm a little new to all this. I'm building a rather small site that I'm guessing won't give useful results. I'll still give it a go when I have the time.

danurbanowicz commented 3 years ago

For a small site with only a handful of pages, any difference in total build time is likely to be in milliseconds. But if you had thousands of pages, it could add up and be worth exploring!