-
-
Notifications
You must be signed in to change notification settings - Fork 753
feat!: remove sri option of HtmlRspackPlugin #12651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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
srioption fromHtmlRspackPluginconfiguration interface - Deleted the entire
sri.rsmodule 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.
chenjiahan
left a comment
There was a problem hiding this 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?
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🎉 Size decreased by 10.50KB from 47.87MB to 47.86MB (⬇️0.02%) |
e83e8e1 to
1c77e55
Compare
Merging this PR will not alter performanceSummary
Comparing Footnotes
|
Summary
Remove deprecated
srioption of HtmlRspackPlugin. Please userspack.SubresourceIntegrityPlugininstead.Related links
Checklist