Sveltekit: how to remove HTML comments from app.html in production build?

I would like to strip HTML comments of app.html in my Sveltekit prduction build (and keep them in app.html during development), how to do it ?

The only thing I thought of would be an end-build step with some regex like described in Remove HTML and Javascript comments automatically