Tabs not working when importing top-level
Author: kasbahCreated Jan 29, 2023Updated 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/[email protected]/lib/wired-item.js?module:4
<anonymous> https://unpkg.com/[email protected]/lib/wired-item.js?module:125If 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.
Source: rough-stuff/wired-elements