-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support for SRI like in Webpack-Html-Plugin #10
Comments
That doesn't seem too hard. I don't use it. It's probably best in userland. It seems if you just have an array of I.e. to create something like this: <link
rel="stylesheet"
href="<%= htmlWebpackPlugin.files.css[index] %>"
integrity="<%= htmlWebpackPlugin.files.cssIntegrity[index] %>"
crossorigin="<%= webpackConfig.output.crossOriginLoading %>"
/> And of course the If you're using Webpack "magic comments" (or Perhaps that solves your problem for now. You can use the flushFiles Low-level API to achieve this. |
I'm just gonna close this cuz I'm cleaning house and likely won't be able to prioritize it. |
It would be nice when the plugin would be able to use the
integrity
information added to assets by the SRI plugin: https://www.npmjs.com/package/webpack-subresource-integrity.This section might be helpful for implementation:
https://www.npmjs.com/package/webpack-subresource-integrity#without-htmlwebpackplugin
With this is place it would be safe to push all these bundles onto a CDN as the browser checks whether the SRI checksums are matching and the correct files are being delivered.
The text was updated successfully, but these errors were encountered: