Skip to content

Add a check on app block for preventing importmap #647

Open
@bakura10

Description

Hello!

In our recent themes I am using import map. Those are awesome.

However, while this has not happened yet, I’m pretty sure some app dev will create an app block in the head that create an import map.

Because only one import map can exist per document, if an app create an import map this will break the theme completely. An app dev might not realize it if they are testing on a theme (such as Dawn) that is not using import map.

As a prevention, theme checker should emit an error if an app block contains a script whose type is importmap (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap).

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions