developer.chrome.com
developer.chrome.com copied to clipboard
Switch to a Rust-based HTML & inline CSS/JS minifier
Switching away from html-minifier
and csso
in favor of @minify-html/js
leads to production builds that are around 33% faster on my M1 Macbook.
I'm not sure what the corresponding speedup will be in the production deployment, but if web.dev was any indication, it should be meaningfully faster.
That being said, we have run into a number of issues with this HTML minifier when used on web.dev because it treats invalid HTML differently than html-minifier
did. We need to keep an eye out for any reports of issues with HTML rendering on the production site following this deployment.
Deploy Preview for developer-chrome-com ready!
Name | Link |
---|---|
Latest commit | 847260d162f0d366d5b25206e6aa00edb9a048f5 |
Latest deploy log | https://app.netlify.com/sites/developer-chrome-com/deploys/6266e20ad936a600082bc4cc |
Deploy Preview | https://deploy-preview-2555--developer-chrome-com.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
I'm going to do a one-off run of an HTML analyzer on the minifier output before we merge this, just to get a gauge for how broken things might be.
Actually, this is using an older version of the HTML minifier. See https://github.com/GoogleChrome/web.dev/issues/8381
Since the API of @minify-html/node changed quite a bit since this implementation, closing this and tracking further in #4048.