Replies: 4 comments 1 reply
-
Has anyone figured out a solution? |
Beta Was this translation helpful? Give feedback.
-
I was really surprised to find that Astro didn't do any HTML minification, so I created |
Beta Was this translation helpful? Give feedback.
-
I was surprised it's not included too. It seems like the using an external HTML minifier would be a great solution for static build. However it would probably have some performance and bundle size cost to include that in SSR mode? Especially for Cloudflare and similar edge platforms. Personally I would love to see Astro adopt JSX style whitespace rules, which I think would solve the issue for both static and SSR, but understand that may not be philosophically aligned with Astro. |
Beta Was this translation helpful? Give feedback.
-
Woohoo! 🎉 This feature has landed on our Roadmap in a Stage 2 proposal. #537 Thanks for your patience with this, everyone. I know this feature has been a long time coming—we're looking forward to having it land as a default optimization in |
Beta Was this translation helpful? Give feedback.
-
Add an option to minify HTML when building (remove whitespace)
Beta Was this translation helpful? Give feedback.
All reactions