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

custom element duplicate element name registration #2603

Closed
rspieker opened this issue Apr 28, 2019 · 2 comments
Closed

custom element duplicate element name registration #2603

rspieker opened this issue Apr 28, 2019 · 2 comments

Comments

@rspieker
Copy link

If a tag name is specified within the rollup config (and not in the .svelte files), that name ends up being specified multiple times (once per .svelte file)

demo repo demonstrating the issue

This may be related to #2417

@Conduitry
Copy link
Member

If you're specifying a tag name in the configuration that's passed to the compiler (via the Rollup config), you're saying any component compiled with that configuration should get that tag name, so this is expected.

See also #1884 for another sort of related issue.

It's possible we should provide a way in rollup-plugin-svelte (and svelte-loader) to vary the compiler options based on which file you're compiling, but I'm not sure what that should look like.

@rspieker
Copy link
Author

Perhaps my expections are off or unclear, I do expect the specified name to be registered, just not for every subcomponent within the package.
If in a customElement flow, I'd expect only the explicitly named ones to end up as a registered component, not every (sub)component as a separate custom element.

This probably ties in with me working with a lot of smaller packages, each becoming a single component, regardless of its internal structure

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

2 participants