You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Svelte's compiler attempts customElements.define(..) at the end of each generated SvelteElement when customElement: true and tag="tag-name" are set.
When used in an environment which uses HMR, this causes the following error:
hmr-client.js:218 [ESM-HMR] Hot Update Error DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "custom-element-example" has already been used with this registry
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Svelte's compiler attempts
customElements.define(..)
at the end of each generatedSvelteElement
whencustomElement: true
andtag="tag-name"
are set.When used in an environment which uses HMR, this causes the following error:
The "offending" line is here:
svelte/src/compiler/compile/render_dom/index.ts
Line 526 in d4f98fb
Reproduce:
@snowpack/svelte-plugin
.customElement: true
in compiler options, like so:.svelte
component file, addtag="tag-name"
tosvelte:options
, like so:Expected Behavior:
Svelte component should be recompiled and properly reregistered within the document scope.
The text was updated successfully, but these errors were encountered: