From 9134ca21941a46c99d70ad91863127e52df21f24 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 26 Aug 2024 17:34:34 +0200 Subject: [PATCH] fix: asynchronously instantiate components when using Svelte 5 Adjusts the behavior to that of the new `mount`/`hydrate` APIs and also fixes #12248 --- .changeset/big-vans-destroy.md | 5 +++++ packages/kit/src/runtime/client/client.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/big-vans-destroy.md diff --git a/.changeset/big-vans-destroy.md b/.changeset/big-vans-destroy.md new file mode 100644 index 000000000000..7cd0ebaac12a --- /dev/null +++ b/.changeset/big-vans-destroy.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix: asynchronously instantiate components when using Svelte 5 diff --git a/packages/kit/src/runtime/client/client.js b/packages/kit/src/runtime/client/client.js index f91728bccc2c..80ed51314cb3 100644 --- a/packages/kit/src/runtime/client/client.js +++ b/packages/kit/src/runtime/client/client.js @@ -434,7 +434,9 @@ function initialize(result, target, hydrate) { root = new app.root({ target, props: { ...result.props, stores, components }, - hydrate + hydrate, + // @ts-ignore Svelte 5 specific + sync: false }); restore_snapshot(current_navigation_index);