For SSR WASM import written in Rust
MIT License
For SSR WASM import.
This library removes extraneous whitespaces between HTML tags. Single spaces are preserved where necessary.
const { minify_html } = require('../utils/minify-html/html_whitespace');
to your render pipeline.res.send(minify_html(body));
npm install minify-html-ssr
This is a runtime library. It is meant to work fast for you. However, a build time solution that collapses whitespace might be better for your app.
Do you brotli compress your HTML? If not, you might be able to drop ~30% of your characters versus gzip.