-
-
Notifications
You must be signed in to change notification settings - Fork 238
feat: add integrity field to manifest when sri is enabled #6634
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 rsbuild 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 adds Subresource Integrity (SRI) hash support to the manifest file. When the security.sri option is enabled, the manifest will now include an integrity field mapping asset file paths to their corresponding SRI hashes.
- Updated
rspack-manifest-pluginfrom 5.1.0 to 5.2.0 to support integrity field - Added
integrityfield toManifestDatatype with documentation - Modified manifest generation logic to collect and populate integrity hashes from assets
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/plugins/manifest.ts | Added logic to collect integrity hashes from file descriptors and include them in manifest output |
| packages/core/src/types/config.ts | Added integrity field to ManifestData type definition with JSDoc documentation |
| packages/core/package.json | Updated rspack-manifest-plugin dependency from 5.1.0 to 5.2.0 |
| pnpm-lock.yaml | Updated lockfile to reflect new rspack-manifest-plugin version |
| website/docs/en/config/output/manifest.mdx | Added English documentation for the new integrity field |
| website/docs/zh/config/output/manifest.mdx | Added Chinese documentation for the new integrity field |
| e2e/cases/output/manifest-integrity/ | Added new test case to verify integrity field is populated correctly in build and dev modes |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Summary
Add Subresource Integrity (SRI) hashes to the manifest file for emitted assets when the security.sri option is enabled.
This includes updating the manifest plugin, adding test cases, and documenting the new integrity field in documentation.
Related Links
Checklist