Skip to content

Dynamic Component Syntax Is Case-Sensitive #14255

@cooperwalbrun

Description

@cooperwalbrun

Describe the bug

When using Svelte 5's dynamic component syntax, it appears that Svelte only honors the component tag in the template if the name it references is capitalized. If the name is not capitalized, the component is simply not rendered (and there is no error message that I can see, either).

I am new to Svelte 5, so if this is intended behavior, could someone point me to where this is mentioned in the documentation? I ended up finding this page in the existing documentation, and it talks about the dynamic component use case, but it does not say anything about the casing requirement (if such a requirement exists).

Reproduction

I created a repository using the SvelteKit CLI (minimal options chosen) to reproduce this error. The repository is here, and the reproduction can be seen in this file (note the comments).

I have been able to reproduce this behavior in non-SvelteKit projects, too.

Logs

No response

System Info

-

Severity

annoyance

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