Skip to content

[Pivots] Option to use global custom elements registry #3076

@nolanlawson

Description

@nolanlawson

Technically this can be done before or after pivots (#2724), but it's related.

We should have a flag that, when enabled, uses the raw customElements global registry to register components, rather than using a pivot system (or the quasi-pivot system we have today).

Benefits are:

  1. Much less code can be shipped, assuming the flag is set at compile-time
  2. With the flag, no need for global patching
  3. APIs like customElements.get() and customElements.whenDefined() can be used to detect defined LWC elements, regardless of [Pivots] customElements.get/whenDefined should not return PivotConstructor #3073

Metadata

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