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:
parent
81d57f2638
commit
6f9a88b31b
2 changed files with 7 additions and 4 deletions
5
.changeset/honest-crabs-scream.md
Normal file
5
.changeset/honest-crabs-scream.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix jsconfig.json aliases not working anymore after 1.5.0
|
|
@ -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
|
// 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'))) {
|
if (!resolve && config.reason === 'invalid-config' && !existsSync(join(cwd, 'tsconfig.json'))) {
|
||||||
config = { reason: 'not-found', path: undefined, exists: false };
|
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
|
// 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'))
|
!existsSync(join(cwd, 'jsconfig.json'))
|
||||||
) {
|
) {
|
||||||
return { reason: 'not-found', path: undefined, exists: false };
|
return { reason: 'not-found', path: undefined, exists: false };
|
||||||
} else {
|
|
||||||
return jsconfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return jsconfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
|
|
Loading…
Reference in a new issue