Skip to content

Tabs not working when importing top-level #189

@kasbah

Description

@kasbah

Previous issues with tabs: #146 , #99 . Tabs are not working for me when imported from top-level.

https://codesandbox.io/s/wired-elements-vanilla-forked-bg4qiw?file=/index.html

Uncaught DOMException: CustomElementRegistry.define: 'wired-item' has already been defined as a custom element custom-element.js:6
    e https://unpkg.com/@lit/reactive-element@^1.6.0/decorators/custom-element.js?module:6
    e https://unpkg.com/@lit/reactive-element@^1.6.0/decorators/custom-element.js?module:6
    __decorate https://unpkg.com/[email protected]/lib/wired-item.js?module:4
    <anonymous> https://unpkg.com/[email protected]/lib/wired-item.js?module:125

If I instead use specific modules:

  <script
    type="module"
    src="https://unpkg.com/wired-elements/lib/wired-tabs.js?module"
  ></script>
  <script
    type="module"
    src="https://unpkg.com/wired-elements/lib/wired-tab.js?module"
  ></script>

Then I encounter #179 but otherwise it seems to be working ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions