Skip to content

Tags are injected with integrity="undefined" on v1.5.0 #131

@jahed

Description

@jahed

I'm on Webpack 4.44.2 and noticed after upgrading to this plugin's v1.5.0 release that injected tags have an undefined integrity. Tags inserted via html-webpack-plugin have the correct integrity, but dynamically injected tags use undefined and the integrity check is bypassed.

Here's what Firefox prints:

The script element has a malformed hash in its integrity attribute: "undefined". The correct format is "<hash algorithm>-<hash value>".

There are no errors or warnings printed during Webpack's build.

Downgrading to 1.4.1 fixes this issue so I'm assuming it's related to the changes that added Webpack 5 support in 1.5.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions