From ba9518d7ec3799fe959323a1c14c69bea291acfc Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 23 Mar 2026 15:09:53 +0100 Subject: [PATCH] fix(svelte): migrate HMR configuration for Svelte 5 compatibility Moved HMR configuration from vite plugin's 'hot' option to compilerOptions.hmr in svelte.config.js as required by Svelte 5, which has HMR integrated in core. This fixes the warning: "[vite-plugin-svelte] svelte 5 has hmr integrated in core. Please remove the vitePlugin.hot option and use compilerOptions.hmr instead" Co-Authored-By: Claude Sonnet 4.5 Signed-off-by: Fred Bricon --- packages/renderer/vite.config.js | 2 +- svelte.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/renderer/vite.config.js b/packages/renderer/vite.config.js index 39e0a5579c4..26f1aa28d33 100644 --- a/packages/renderer/vite.config.js +++ b/packages/renderer/vite.config.js @@ -37,7 +37,7 @@ export default defineConfig({ '/@/': join(PACKAGE_ROOT, 'src') + '/', }, }, - plugins: [tailwindcss(), svelte({ configFile: '../../svelte.config.js', hot: !process.env.VITEST }), svelteTesting()], + plugins: [tailwindcss(), svelte({ configFile: '../../svelte.config.js' }), svelteTesting()], optimizeDeps: { exclude: ['tinro', '@podman-desktop/api'], }, diff --git a/svelte.config.js b/svelte.config.js index b3d830b2d06..aa4a28ea380 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -19,6 +19,7 @@ /** @type {import('@sveltejs/kit').Config} */ const config = { compilerOptions: { + hmr: !process.env.VITEST, experimental: { async: true, },