Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs not working when importing top-level #189

Open
kasbah opened this issue Jan 29, 2023 · 0 comments
Open

Tabs not working when importing top-level #189

kasbah opened this issue Jan 29, 2023 · 0 comments

Comments

@kasbah
Copy link

kasbah commented Jan 29, 2023

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/wired-elements@3.0.0-rc.6/lib/wired-item.js?module:4
    <anonymous> https://unpkg.com/wired-elements@3.0.0-rc.6/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant