Tech
Minifying Astro HTML after the build: a post-build script, measured
This is a standalone example for static Astro projects. The site where I measured it, straffesites.com , does not use the script in production. In October 2026, I did run it on a copy of that site's build to measure what a post-build step does to your Astro HTML. The script adds unique IDs to headings that do not have one yet and minifies the files with html-minifier-terser. Here is how to set it up, what the measurement showed, and what to watch out for.
What do you need to get sta...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to