feat(48665): tsconfig "extends" field ignores "exports" field of source package (#50955)

* feat(48665): resolve configs from the exports field of the source package

* add missed property

* rename loadFileName to loadFileNameFromPackageJsonField

* Apply suggestions from code review

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-12-19 16:40:12 -08:00
1 parent 0f5e037e1d
commit 5951ee9cff
3 files changed
+41 -6

No files matched your search

+2 -2
View File
@@ -85,7 +85,7 @@ import {
NewLineKind,
Node,
NodeArray,
nodeModuleNameResolver,
nodeNextJsonConfigResolver,
normalizePath,
normalizeSlashes,
NumericLiteral,
@@ -3413,7 +3413,7 @@ function getExtendsConfigPath(
return extendedConfigPath;
}
// If the path isn't a rooted or relative path, resolve like a module
const resolved = nodeModuleNameResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), { moduleResolution: ModuleResolutionKind.Node10 }, host, /*cache*/ undefined, /*projectRefs*/ undefined, /*lookupConfig*/ true);
const resolved = nodeNextJsonConfigResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), host);
if (resolved.resolvedModule) {
return resolved.resolvedModule.resolvedFileName;
}