-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
fix: subresource integrity #803
Conversation
packages/webpack-plugin/src/index.js
Outdated
@@ -123,6 +123,25 @@ class LoadablePlugin { | |||
}, | |||
) | |||
}) | |||
|
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.
checked - SriPlugin extends assets information at PROCESS_ASSETS_STAGE_OPTIMIZE_HASH stage, so at PROCESS_ASSETS_STAGE_REPORT all extra fields should be already a part of stats.
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.
youre right, thanks! i wasnt seeing the integrity available at this stage before but i must have been looking in the wrong place at the time
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.
There should be close to zero changes around LoadablePlugin.apply
done, thanks for the feedback! |
8087d1d
to
a2139be
Compare
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.
Wow it's really simple now! I'll review it shortly
a2139be
to
f1a4a6f
Compare
hey @theKashey, just checking if youve had a chance to take another look? currently i wrote a new plugin to do this work for our project but i would prefer not to keep it around. thanks! |
Verified and merged. 👍 |
thank you @theKashey! any chance for a new release with this in it? |
Summary
this pull request solves the problem of integrity not being added to script tags when using
webpack-subresource-integrity
. it seems that either #436 did not include everything necessary or possibly my configuration is different but i was unable to get things working properly without these changes. other users are seeing this issue as well as seen in #563Test plan
webpack-subresource-integrity
to your webpack pluginsintegrity
attribute inloadable-stats.json
and on yourscript
tags when usingChunkExtractor.getScriptTags