There was an error while loading. Please reload this page.
1 parent 5b2657d commit 34a08f3Copy full SHA for 34a08f3
1 file changed
src/resolve.ts
@@ -4,7 +4,9 @@ import { normalizeSlashes } from "./utils";
4
5
export function getProjectRootDir(program: ts.Program): string {
6
const options = program.getCompilerOptions();
7
- const projectDir = options.configFilePath || program.getCommonSourceDirectory();
+ const projectDir = options.configFilePath
8
+ ? path.dirname(options.configFilePath)
9
+ : program.getCommonSourceDirectory();
10
11
return normalizeSlashes(options.rootDir ? path.resolve(projectDir, options.rootDir) : projectDir);
12
}
0 commit comments