Skip to content

ReorderHead transformer accidentally deduplicates based on URL #125

@schlessera

Description

@schlessera

The ReorderHead transformer uses the URL as an array key when collecting <script> elements to reorder. This means that if multiple <script> elements use the same URL (like for .mjs script + nomodule fallback), they overwrite each other in the array and are effectively "deduplicated".

The ReorderHead transformer needs a more robust algorithm. It seems that deduplication is still desirable, but will need to rely on "URL + a selection of attributes". The exact selection needs to be clarified, but for now it might help to hash the URL + the presence of nomodule as a first bug fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions