0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Fix aliases from jsconfig.json not being picked up anymore (#5076)

* Fix aliases from jsconfig.json not being picked up anymore

* Add changeset
This commit is contained in:
Erika 2022-10-13 15:39:32 -03:00 committed by GitHub
parent 81d57f2638
commit 6f9a88b31b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix jsconfig.json aliases not working anymore after 1.5.0

View file

@ -62,8 +62,6 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
// the file does not exists. We'll manually handle this so we can provide better errors to users
if (!resolve && config.reason === 'invalid-config' && !existsSync(join(cwd, 'tsconfig.json'))) {
config = { reason: 'not-found', path: undefined, exists: false };
} else {
return config;
}
// If we couldn't find a tsconfig.json, try to load a jsconfig.json instead
@ -80,9 +78,9 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
!existsSync(join(cwd, 'jsconfig.json'))
) {
return { reason: 'not-found', path: undefined, exists: false };
} else {
return jsconfig;
}
return jsconfig;
}
return config;