Describe the bug
When compilerOptions.experimental.async: true is enabled in svelte.config.js, Hot Module Replacement (HMR) fails after client-side navigation. The page component content disappears from the DOM when editing the page's .svelte file. A full page refresh is required to restore functionality.
Reproduction
- Enable experimental async in svelte.config.js:
export default {
compilerOptions: {
experimental: {
async: true,
},
},
};
- Start dev server and loading the page directly (works fine)
- Edit the page component - HMR works correctly
- Navigate to another page using client-side navigation
- Edit the page component - the page component content disappears
- Refresh the page - content reappears and HMR works again until next navigation
Logs
No logs...
System Info
System:
OS: Windows 11 10.0.26100
CPU: (24) x64 AMD Ryzen 9 9900X 12-Core Processor
Memory: 8.00 GB / 31.08 GB
Binaries:
Node: 24.6.0 - C:\nvm4w\nodejs\node.EXE
npm: 11.5.1 - C:\Users\admin\AppData\Local\pnpm\npm.CMD
pnpm: 10.18.1 - C:\nvm4w\nodejs\pnpm.CMD
Deno: 2.2.1 - C:\Users\admin\AppData\Local\Microsoft\WinGet\Packages\DenoLand.Deno_Microsoft.Winget.Source_8wekyb3d8bbwe\deno.EXE
Browsers:
Edge: Chromium (140.0.3485.54)
Firefox Developer Edition: 144.0 - C:\Program Files\Firefox Developer Edition\firefox.exe
npmPackages:
@sveltejs/adapter-node: ^5.3.3 => 5.3.3
@sveltejs/kit: ^2.46.4 => 2.46.4
@sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
svelte: ^5.39.11 => 5.39.11
vite: ^7.1.9 => 7.1.9
Severity
annoyance
Additional Information
https://www.sveltelab.dev/4z1u30zw8n2tj87
Very similar issue: sveltejs/svelte#12403
Describe the bug
When
compilerOptions.experimental.async: trueis enabled in svelte.config.js, Hot Module Replacement (HMR) fails after client-side navigation. The page component content disappears from the DOM when editing the page's .svelte file. A full page refresh is required to restore functionality.Reproduction
Logs
No logs...
System Info
System: OS: Windows 11 10.0.26100 CPU: (24) x64 AMD Ryzen 9 9900X 12-Core Processor Memory: 8.00 GB / 31.08 GB Binaries: Node: 24.6.0 - C:\nvm4w\nodejs\node.EXE npm: 11.5.1 - C:\Users\admin\AppData\Local\pnpm\npm.CMD pnpm: 10.18.1 - C:\nvm4w\nodejs\pnpm.CMD Deno: 2.2.1 - C:\Users\admin\AppData\Local\Microsoft\WinGet\Packages\DenoLand.Deno_Microsoft.Winget.Source_8wekyb3d8bbwe\deno.EXE Browsers: Edge: Chromium (140.0.3485.54) Firefox Developer Edition: 144.0 - C:\Program Files\Firefox Developer Edition\firefox.exe npmPackages: @sveltejs/adapter-node: ^5.3.3 => 5.3.3 @sveltejs/kit: ^2.46.4 => 2.46.4 @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1 svelte: ^5.39.11 => 5.39.11 vite: ^7.1.9 => 7.1.9Severity
annoyance
Additional Information
https://www.sveltelab.dev/4z1u30zw8n2tj87
Very similar issue: sveltejs/svelte#12403