Skip to content

Conversation

@LingyuCoder
Copy link
Contributor

Summary

Remove deprecated sri option of HtmlRspackPlugin. Please use rspack.SubresourceIntegrityPlugin instead.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings January 7, 2026 03:35
@LingyuCoder LingyuCoder requested a review from hardfist as a code owner January 7, 2026 03:35
@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Jan 7, 2026
@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit da1481a
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/695dd64d9cfe3f0008cab4e0
😎 Deploy Preview https://deploy-preview-12651--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated sri option from HtmlRspackPlugin as part of a breaking change. Users should migrate to using the dedicated rspack.SubresourceIntegrityPlugin instead, which provides the same functionality through a more modular approach.

Key Changes:

  • Removed the sri option from HtmlRspackPlugin configuration interface
  • Deleted the entire sri.rs module containing SRI hash calculation logic
  • Updated test cases to remove SRI-related assertions and updated snapshots accordingly

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/docs/en/plugins/rspack/html-rspack-plugin.mdx Removed sri option from English documentation
website/docs/zh/plugins/rspack/html-rspack-plugin.mdx Removed sri option from Chinese documentation
tests/rspack-test/builtinCases/plugin-html/variant/rspack.config.js Removed sri: "sha512" from test configuration
tests/rspack-test/builtinCases/plugin-html/variant/__snapshots__/output.snap.txt Updated snapshot to reflect removal of crossorigin and integrity attributes
packages/rspack/src/builtin-plugin/html-plugin/plugin.ts Removed sri field from plugin configuration mapping
packages/rspack/src/builtin-plugin/html-plugin/options.ts Removed sri property and its JSDoc from TypeScript type definition
packages/rspack/etc/core.api.md Removed sri from public API surface
crates/rspack_plugin_html/src/sri.rs Deleted entire SRI module containing hash function enum and digest creation logic
crates/rspack_plugin_html/src/plugin.rs Updated from_assets call to remove asset_map parameter (no longer needed for SRI)
crates/rspack_plugin_html/src/lib.rs Removed pub mod sri; declaration
crates/rspack_plugin_html/src/config.rs Removed sri field from HtmlRspackPluginOptions struct and its default implementation
crates/rspack_plugin_html/src/asset.rs Removed SRI hash calculation logic from from_assets method and removed unused parameter
crates/rspack_binding_api/src/raw_options/raw_builtins/raw_html.rs Removed sri field, type alias, and conversion logic from Napi bindings
crates/node_binding/napi-binding.d.ts Removed sri property from TypeScript interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this change to #9270?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 825.4 KB 0
react-5k 2.7 MB 0
rome 984.3 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📦 Binary Size-limit

Comparing d727708 to chore: run ci/eco-ci/eco-benchmark on v2 branch (#12650) by harpsealjs

🎉 Size decreased by 10.50KB from 47.87MB to 47.86MB (⬇️0.02%)

@LingyuCoder LingyuCoder changed the base branch from main to v2 January 7, 2026 03:58
@LingyuCoder LingyuCoder force-pushed the feat/remove-html-sri branch from e83e8e1 to 1c77e55 Compare January 7, 2026 04:05
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 7, 2026

Merging this PR will not alter performance

Summary

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing feat/remove-html-sri (d727708) with main (25a4021)2

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

  2. No successful run was found on v2 (758b913) during the generation of this report, so main (25a4021) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@chenjiahan chenjiahan merged commit 5eac88c into v2 Jan 7, 2026
49 checks passed
@chenjiahan chenjiahan deleted the feat/remove-html-sri branch January 7, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants