Skip to content

perf!: remove builtin terser HTML minimizer#2833

Merged
chenjiahan merged 8 commits intomainfrom
html_minify_0608
Jul 8, 2024
Merged

perf!: remove builtin terser HTML minimizer#2833
chenjiahan merged 8 commits intomainfrom
html_minify_0608

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Jul 8, 2024

Summary

BREAKING CHANGES:

  • Bump html-rspack-plugin 6.0.0 alpha, remove builtin terser HTML minimizer.
  • Remove the output.minify.html and output.minify.htmlOptions options.

Motivation

Rsbuild 1.0.0-alpha.6 removed the output.minify.html and output.minify.htmlOptions options, and no longer minify the HTML files.

Previously Rsbuild uses html-minifier-terser to minify the HTML files. But the performance of html-minifier-terser can not meet the needs of Rsbuild applications, and In most cases, there is little benefit in compressing HTML.

At this stage, we do not want to builtin html-minifier-terser , so we provide a standalone rsbuild-plugin-html-minifier-terser to support HTML minification.

// rsbuild.config.ts
import { pluginHtmlMinifierTerser } from "rsbuild-plugin-html-minifier-terser";

export default {
  plugins: [pluginHtmlMinifierTerser()],
};

And we plan to use some faster Rust-based HTML minimizer in the future.

Related Links

rstackjs/html-rspack-plugin#2

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify bot commented Jul 8, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 72788a9
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/668b9a7856907400080889c5
😎 Deploy Preview https://deploy-preview-2833--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 79 (no change from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@chenjiahan chenjiahan merged commit 1959f14 into main Jul 8, 2024
@chenjiahan chenjiahan deleted the html_minify_0608 branch July 8, 2024 08:16
This was referenced Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant