mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
feat: create stub tsconfig if there are not any
This commit is contained in:
parent
15f154d9d5
commit
71ddbb4e0f
1 changed files with 5 additions and 0 deletions
|
@ -146,6 +146,11 @@ 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
|
||||
|
|
Loading…
Reference in a new issue