Skip to content

Commit b1a6c4e

Browse files
committed
win test
1 parent ab11579 commit b1a6c4e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/TsconfigPathsUtils.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async function loadTsconfigFromExtends(
117117
extendedConfigValue += ".json";
118118
}
119119

120-
const currentDir = path.dirname(configFilePath);
120+
const currentDir = normalize(path.dirname(configFilePath));
121121
let extendedConfigPath = join(currentDir, extendedConfigValue);
122122

123123
// Check if file exists, if not try node_modules
@@ -146,7 +146,7 @@ async function loadTsconfigFromExtends(
146146
// baseUrl should be interpreted as relative to extendedConfigPath,
147147
// but we need to update it so it is relative to the original tsconfig being loaded
148148
if (compilerOptions.baseUrl) {
149-
const extendsDir = path.dirname(extendedConfigValue);
149+
const extendsDir = normalize(path.dirname(extendedConfigValue));
150150
compilerOptions.baseUrl = join(extendsDir, compilerOptions.baseUrl);
151151
}
152152

@@ -236,13 +236,16 @@ async function readTsconfigCompilerOptions(fileSystem, absTsconfigPath) {
236236
let { baseUrl } = compilerOptions;
237237

238238
if (!baseUrl) {
239-
baseUrl = path.dirname(absTsconfigPath);
239+
baseUrl = normalize(path.dirname(absTsconfigPath));
240240
} else if (!isAbsolute(baseUrl)) {
241-
baseUrl = join(path.dirname(absTsconfigPath), baseUrl);
241+
baseUrl = join(normalize(path.dirname(absTsconfigPath)), baseUrl);
242242
}
243243

244244
const paths = compilerOptions.paths || {};
245-
return { options: { baseUrl, paths }, fileDependencies };
245+
return {
246+
options: { baseUrl, paths },
247+
fileDependencies,
248+
};
246249
} catch (_e) {
247250
return null;
248251
}

0 commit comments

Comments
 (0)