diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 81f291090..bc6e58a9c 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -58,6 +58,11 @@ export async function createVite( define: { 'import.meta.env.SITE': astroConfig.site ? `'${astroConfig.site}'` : 'undefined', }, + // fixes HMR for static components + // TODO: remove! + legacy: { + devDepsScanner: true, + }, server: { hmr: process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production'