|
@@ -1014,11 +1014,11 @@ function resolveWithTS(
|
|
|
(c.config.options.pathsBasePath as string) ||
|
|
(c.config.options.pathsBasePath as string) ||
|
|
|
dirname(c.config.options.configFilePath as string),
|
|
dirname(c.config.options.configFilePath as string),
|
|
|
)
|
|
)
|
|
|
- const included: string[] = c.config.raw?.include
|
|
|
|
|
- const excluded: string[] = c.config.raw?.exclude
|
|
|
|
|
|
|
+ const included: string[] | undefined = c.config.raw?.include
|
|
|
|
|
+ const excluded: string[] | undefined = c.config.raw?.exclude
|
|
|
if (
|
|
if (
|
|
|
(!included && (!base || containingFile.startsWith(base))) ||
|
|
(!included && (!base || containingFile.startsWith(base))) ||
|
|
|
- included.some(p => isMatch(containingFile, joinPaths(base, p)))
|
|
|
|
|
|
|
+ included?.some(p => isMatch(containingFile, joinPaths(base, p)))
|
|
|
) {
|
|
) {
|
|
|
if (
|
|
if (
|
|
|
excluded &&
|
|
excluded &&
|
|
@@ -1089,8 +1089,12 @@ function loadTSConfig(
|
|
|
const res = [config]
|
|
const res = [config]
|
|
|
if (config.projectReferences) {
|
|
if (config.projectReferences) {
|
|
|
for (const ref of config.projectReferences) {
|
|
for (const ref of config.projectReferences) {
|
|
|
- tsConfigRefMap.set(ref.path, configPath)
|
|
|
|
|
- res.unshift(...loadTSConfig(ref.path, ts, fs))
|
|
|
|
|
|
|
+ const refPath = ts.resolveProjectReferencePath(ref)
|
|
|
|
|
+ if (!fs.fileExists(refPath)) {
|
|
|
|
|
+ continue
|
|
|
|
|
+ }
|
|
|
|
|
+ tsConfigRefMap.set(refPath, configPath)
|
|
|
|
|
+ res.unshift(...loadTSConfig(refPath, ts, fs))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return res
|
|
return res
|