Add a check on app block for preventing importmap #647
Open
Description
opened on Dec 4, 2024
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