Closed
Description
Describe the bug
Hello,
next.167 breaks <svelte:component>
in development mode (vite). Changing this
value makes component disappear. If svelte:component is put inside {#key ..}
and key is updated as well, new component is appended to the old ones, ie. <svelte:component>
grows and renders all previous components before the new one.
This problem does not exist in next.166 and disappears in production after vite build
.
Reproduction
Can't provide REPL, as there is no problem in production mode.
C1 and C2 are any components, just different visually.
Changing to V5 syntax also doesn't help.
<script>
import C1 from "./C1.svelte";
import C2 from "./C2.svelte";
let comp = C1
function change() {
comp = comp === C1 ? C2 : C1;
}
</script>
<svelte:component this={comp}></svelte:component>
<button on:click={change}>change</button>
Logs
No response
System Info
svelte: 5.0.0-next.167
Severity
blocking all usage of svelte
Metadata
Metadata
Assignees
Labels
No labels