-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
feat: support experiments.SubresourceIntegrityPlugin
#9171
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for rspack canceled.
|
CodSpeed Performance ReportMerging #9171 will not alter performanceComparing Summary
|
353f43d
to
dc50b27
Compare
LingyuCoder
commented
Feb 13, 2025
LingyuCoder
commented
Feb 13, 2025
experiments.SubresourceIntegrityPlugin
bcae81d
to
094b926
Compare
hardfist
reviewed
Feb 14, 2025
hardfist
reviewed
Feb 14, 2025
a8bde99
to
c2dc33d
Compare
c2dc33d
to
2344284
Compare
chenjiahan
reviewed
Feb 14, 2025
chenjiahan
reviewed
Feb 14, 2025
d81bc93
to
ff1a2e0
Compare
hardfist
approved these changes
Feb 14, 2025
2 tasks
chenjiahan
pushed a commit
that referenced
this pull request
Feb 14, 2025
* feat(sri): add native plugin --------- Co-authored-by: LingyuCoder <[email protected]>
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
relate to #4381
crates/rspack_plugin_sri
, which implements most logic of webpack-subresource-integrity. IfHtmlRspackPlugin
is used, the native plugin will interact with it directly.packages/rspack/src/builtin-plugin/SubresourceIntegrityPlugin.ts
, which will interact withhtml-webpack-plugin
if it is used.tests/plugin-test/sri-plugin
. If the test case useshtml-webpack-plugin
, then it will also be runned withHtmlRspackPlugin
instead.rspack.experiments.SubresourceIntegrityPlugin
.This pull request introduces the Subresource Integrity (SRI) plugin to the
rspack
project, which ensures that resources loaded by a web application have not been manipulated. The most important changes include the addition of the SRI plugin and its integration into various parts of the codebase.Introduction of SRI Plugin:
rspack_plugin_sri
with its ownCargo.toml
and implementation files. This module includes the main logic for the SRI plugin, which computes integrity hashes for assets and integrates with the existing compilation process. [1] [2] [3]Integration with Existing Codebase:
Cargo.toml Updates:
Cargo.toml
files in various crates to include the newrspack_plugin_sri
as a dependency. This ensures that the SRI plugin is available throughout the project. [1] [2]Modifications in
raw_builtins
:raw_sri
module and integratedRawSRIPluginOptions
into the existing structure. This includes updates to theBuiltinPluginName
enum and theBuiltinPlugin
implementation to support the new SRI plugin. [1] [2] [3] [4] [5]Configuration Changes:
PUPPETEER_SKIP_DOWNLOAD
environment variable in the.github/workflows/reusable-build.yml
file, likely to avoid conflicts or unnecessary downloads during the build process.Checklist