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 <noreply@anthropic.com>
Signed-off-by: Fred Bricon <fbricon@gmail.com>
This commit is contained in:
Fred Bricon 2026-03-23 15:09:53 +01:00 committed by Florent BENOIT
parent e9e4dc1d6e
commit ba9518d7ec
2 changed files with 2 additions and 1 deletions

View file

@ -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'],
},

View file

@ -19,6 +19,7 @@
/** @type {import('@sveltejs/kit').Config} */
const config = {
compilerOptions: {
hmr: !process.env.VITEST,
experimental: {
async: true,
},