From 694b3f024b4ee3152236f4049514241321263904 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Thu, 23 Jun 2022 18:45:15 -0400 Subject: [PATCH] sad refactor: use legacy devDepsScanner for component HMR --- packages/astro/src/core/create-vite.ts | 5 +++++ 1 file changed, 5 insertions(+) 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'