From 20c7765be539365002defb14bfd6b22c076b8b73 Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Wed, 14 Aug 2024 14:59:04 +0200 Subject: [PATCH] chore: optimize check (#11704) --- packages/astro/src/core/dev/restart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/dev/restart.ts b/packages/astro/src/core/dev/restart.ts index 235454cb5a..ee0ba995c4 100644 --- a/packages/astro/src/core/dev/restart.ts +++ b/packages/astro/src/core/dev/restart.ts @@ -51,7 +51,7 @@ function shouldRestartContainer( const settingsPath = vite.normalizePath( fileURLToPath(new URL('settings.json', settings.dotAstroDir)), ); - if (settingsPath.match(normalizedChangedFile)) { + if (settingsPath.endsWith(normalizedChangedFile)) { shouldRestart = settings.preferences.ignoreNextPreferenceReload ? false : true; settings.preferences.ignoreNextPreferenceReload = false;