Skip to content

v5.5.0 contains breaking change with type attribute having undefined value #1710

@StephanBijzitter

Description

@StephanBijzitter

Current behaviour 💣

When using a custom template (and injecting tags/attributes manually), v5.5.0 has introduced a breaking change where the "type" attribute can be present with a value of undefined. In my case, this result in the rendering of type="undefined", preventing all scripts from being loaded by the browser.

htmlWebpackPlugin.tags.bodyTags[0].attributes
// {type: undefined, otherStuff: ...}

Expected behaviour ☀️

Like v5.4.0: attributes with an undefined value should not be present in the attributes object.

htmlWebpackPlugin.tags.bodyTags[0].attributes
// {otherStuff: ...}

Reproduction Example 👾

Not applicable.

Environment 🖥

  • v5.4.0 is okay
  • v5.5.0 is the first version to have undefined values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions