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;