Skip to content

Using components in <svelte:head> creates duplicate elements on hydration #4533

@domingues

Description

@domingues

If we include a component inside <svelte:head>:

<svelte:head>
<A/>
</svelte:head>

with A.svelte:

<meta property="x" content="y"/>

this meta is duplicated, not fixed by #4082.

If this is discouraged we should throw a warning.


P.S.:

Note that this is only a problem in the reported example. There is no problem when done this way:

<!-- Main.svelte -->
<A/>
<!-- A.svelte -->
<svelte:head>
<meta property="x" content="y"/>
</svelte:head>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions