mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
feat: add check
This commit is contained in:
parent
71ddbb4e0f
commit
9309c7eec2
1 changed files with 7 additions and 5 deletions
|
@ -146,11 +146,6 @@ export async function resolveConfig(
|
|||
inlineUserConfig.root = root;
|
||||
}
|
||||
|
||||
const generatedTsConfigUrl = new URL('./.astro/tsconfig.json', inlineUserConfig.root);
|
||||
if (!fsMod.existsSync(generatedTsConfigUrl)) {
|
||||
fsMod.writeFileSync(generatedTsConfigUrl, '{}', 'utf-8');
|
||||
}
|
||||
|
||||
const userConfig = await loadConfig(root, inlineOnlyConfig.configFile, fsMod);
|
||||
const mergedConfig = mergeConfig(userConfig, inlineUserConfig);
|
||||
// First-Pass Validation
|
||||
|
@ -170,5 +165,12 @@ export async function resolveConfig(
|
|||
throw e;
|
||||
}
|
||||
|
||||
if (astroConfig.experimental.typescript) {
|
||||
const generatedTsConfigUrl = new URL('./.astro/tsconfig.json', astroConfig.root);
|
||||
if (!fsMod.existsSync(generatedTsConfigUrl)) {
|
||||
fsMod.writeFileSync(generatedTsConfigUrl, '{}', 'utf-8');
|
||||
}
|
||||
}
|
||||
|
||||
return { userConfig: mergedConfig, astroConfig };
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue