-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
output file hash to manifest #35
Comments
@enapupe Can you give me an output example? |
I could but I realize it's probably not Anyway, I think a good output format would require changing the json object to something more complex like:
I'll share my server implementation later. |
This is what I ended up with: https://github.com/CheesecakeLabs/react-redux-boilerplate/pull/41/files I'm probably going to improve it a bit but overall that's the idea. |
I will probably add a reduce: (manifest, {chunkName, fileName, source}) => {
return {
...manifest,
[chunkName]: {
file: fileName,
hash: source.integrity
}
};
} |
Thank you sir! |
@enapupe NP, let me know how you manage to get it to work this: https://github.com/waysact/webpack-subresource-integrity |
Also would be awesome if you could send us a PR, to add an example under: |
This would be a quick version of SRI hash impementation:
And an example manifest json file for the above
|
Cool 👍 , I guess this wouldn't work with |
Yeah, it reads from FS so no. But I'm not sure why it should... It seems unnecessary. |
@enapupe I tried the above code but it seems to run before the files are written to the file system? Here's the error:
|
I have the same problem as @RinkAttendant6 , the files are not there yet... using webpack 4... and using 'generate'... any idea? TIA |
What do you guys think about adding hash information to manifest file so we can make use of SRI?
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity?
The text was updated successfully, but these errors were encountered: