Skip to content

Include webpack-subresource-integrity plugin #37

@roborourke

Description

@roborourke

https://www.npmjs.com/package/webpack-subresource-integrity

This plugin has two effects, one for HtmlWebpackPlugin which doesn't affect but also provides support for chunks created when we're using code splitting. It adds integrity and crossorigin attributes to dynamically loaded scripts with the hash of the loaded file.

It's an added security feature and will be important to use in conjunction with any future sites that want to use the require-sri content security policy.

Notes:

  • You have to set the output.crossOriginLoading parameter, use "anonymous" as the value
  • Only need to use a single hash function eg. hashFuncNames: [ 'sha384' ] is a good default

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions