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
Now I have a separate module for links, which contains one element Link.html, which I planned to use as a standalone element and in other modules as well. For example (this is inside a component called Input.html):
Similar thing I do in other elements. Now each module is built separately, and when I import them one by one in other application, for example in my app.module.ts in angular app:
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
Can someone tell me if it's a bug in svelte compiler ? I would expect those elements to check if they are not defined yet, and only then add themselves into the registry.
Btw, when testing it as if it was built as a single module it seems to work. So that's a potential workaround for now.
The text was updated successfully, but these errors were encountered:
Thanks. I'm going to close this in favour of #2417 — I don't think it's helpful to silently fail to register an element if the same tag has already been used, so it this is happening then a better solution is to give app authors the ability to choose tags at runtime.
I have many small modules which are packed as separate custom elements with svelte-rollup-plugin. Eg:
Now I have a separate module for links, which contains one element
Link.html
, which I planned to use as a standalone element and in other modules as well. For example (this is inside a component calledInput.html
):Similar thing I do in other elements. Now each module is built separately, and when I import them one by one in other application, for example in my
app.module.ts
in angular app:I get the following error in the console:
Can someone tell me if it's a bug in svelte compiler ? I would expect those elements to check if they are not defined yet, and only then add themselves into the registry.
Btw, when testing it as if it was built as a single module it seems to work. So that's a potential workaround for now.
The text was updated successfully, but these errors were encountered: