jaketrent / html-webpack-template

a better default template for html-webpack-plugin
MIT License
830 stars 139 forks source link

Respect the same SRI checks that HWP supports via webpack-subresource-integrity #57

Closed eliperelman closed 6 years ago

eliperelman commented 6 years ago

html-webpack-plugin respects crossorigin and integrity attributes set on chunks via the webpack-subresource-integrity plugin. This PR attempts to support this as well by adding those attributes to script and link tags which can have integrity attributes.

jaketrent commented 6 years ago

@eliperelman thanks for this.  looks good, but I know little about it. Is there a link to the HWP doc about this feature that you could point me to for some quick education pre-merge?

eliperelman commented 6 years ago

Sure! The issue on HWP is:

https://github.com/jantimon/html-webpack-plugin/issues/330

Which led to the creation of:

https://github.com/waysact/webpack-subresource-integrity

If you currently use the webpack-subresource-integrity plugin with HWT, no integrity data is added to assets.

jaketrent commented 6 years ago

Thanks for the link! Looks great.

eliperelman commented 6 years ago

Thank you for the merge! Note that I think the approach in #61 would be a good idea for avoiding PRs like this in the future. 👍

jaketrent commented 6 years ago

Noted, thanks!

On Tue, Oct 24, 2017 at 2:23 PM, Eli Perelman notifications@github.com wrote:

Thank you for the merge! Note that I think the approach in #61 https://github.com/jaketrent/html-webpack-template/issues/61 would be a good idea for avoiding PRs like this in the future. 👍

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jaketrent/html-webpack-template/pull/57#issuecomment-339119544, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhsbCFn1-Y74cYxTmuHmnri8jSAaQMNks5svkdcgaJpZM4P3rqs .