From d707b08c48b8e56e8bec8afdff562f962bb10da4 Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Wed, 11 Oct 2023 11:06:50 +0200 Subject: [PATCH] fix: make sure package.json is in te list of watched files --- packages/astro/src/core/config/settings.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/config/settings.ts b/packages/astro/src/core/config/settings.ts index 2c32de2b4..07f22a33c 100644 --- a/packages/astro/src/core/config/settings.ts +++ b/packages/astro/src/core/config/settings.ts @@ -112,12 +112,14 @@ export async function createSettings(config: AstroConfig, cwd?: string): Promise } if (typeof tsconfig !== 'string') { - watchFiles = [tsconfig.tsconfigFile, ...(tsconfig.extended ?? []).map((e) => e.tsconfigFile)]; - - settings.watchFiles = watchFiles; + watchFiles.push( + ...[tsconfig.tsconfigFile, ...(tsconfig.extended ?? []).map((e) => e.tsconfigFile)] + ); settings.tsConfig = tsconfig.tsconfig; settings.tsConfigPath = tsconfig.tsconfigFile; } + settings.watchFiles = watchFiles; + return settings; }