Skip to content

tag required in customElement options #13161

Closed
@gVguy

Description

@gVguy

Describe the bug

The docs state

You can leave out the tag name ... Consumers of the component can still name it afterwards if needed, using the static element property ...

However in the actual project when you want to set some other options, eg <svelte:options customElement={{}} /> the tag property is suddenly required.

Setting the tag would disallow the use of the customElements in a selective way as required by the consumer, auto-defining the customElement at import time with a pre-defined tag.

This is currently present in both v4 and v5.

Reproduction

https://svelte.dev/repl/5fb1659f5ea24696ae342144eb492acb?version=4.2.19

Logs

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 1.01 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
  Browsers:
    Chrome: 128.0.6613.120
    Chrome Canary: 130.0.6701.0
    Safari: 17.4.1
  npmPackages:
    svelte: ^5.0.0-next.244 => 5.0.0-next.244

Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions