fix: make sure package.json is in te list of watched files

This commit is contained in:
Princesseuh 2023-10-11 11:06:50 +02:00
parent 75d947de7f
commit d707b08c48
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0

View file

@ -112,12 +112,14 @@ export async function createSettings(config: AstroConfig, cwd?: string): Promise
} }
if (typeof tsconfig !== 'string') { if (typeof tsconfig !== 'string') {
watchFiles = [tsconfig.tsconfigFile, ...(tsconfig.extended ?? []).map((e) => e.tsconfigFile)]; watchFiles.push(
...[tsconfig.tsconfigFile, ...(tsconfig.extended ?? []).map((e) => e.tsconfigFile)]
settings.watchFiles = watchFiles; );
settings.tsConfig = tsconfig.tsconfig; settings.tsConfig = tsconfig.tsconfig;
settings.tsConfigPath = tsconfig.tsconfigFile; settings.tsConfigPath = tsconfig.tsconfigFile;
} }
settings.watchFiles = watchFiles;
return settings; return settings;
} }