Skip to content

[framework]: add console warning when setting scoping suffix if components are already defined #10771

@pskelin

Description

@pskelin

Bug Description

With #9857, importing an elements calls customElements.define() immediately, which means scoping suffix has to be already set.

The loading of the module and setting the scoping suffix in a separate module before all component imports is documented, but hard to miss and the fix is hard to find.

Proposed solution: When calling setCustomElementsScopingSuffix, there should be a warning pointing to the correct import order, in cасе any components are already defined.

https://github.com/SAP/ui5-webcomponents/blob/99faaa82ee1d18ab05cd9173975c0cbd7a4977a9/docs/2-advanced/06-scoping.md#L14-L19

Metadata

Metadata

Assignees

No one assigned

    Labels

    TOPIC CorebugThis issue is a bug in the code

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions