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

next.167 breaks <svelte:component> in development mode #12233

Closed
vits opened this issue Jun 30, 2024 · 0 comments · Fixed by #12242
Closed

next.167 breaks <svelte:component> in development mode #12233

vits opened this issue Jun 30, 2024 · 0 comments · Fixed by #12242

Comments

@vits
Copy link

vits commented Jun 30, 2024

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

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

Successfully merging a pull request may close this issue.

1 participant