Skip to content

Commit bb4f0be

Browse files
committed
Add warning about rootDir overwritting
1 parent eeb28c2 commit bb4f0be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/typescript.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export function getTypescriptConfig(
9393
}
9494

9595
// disallow overrriding rootDir
96-
configParseResult.options.rootDir = './'
96+
if (path.resolve(configParseResult.options.rootDir) !== path.resolve(cwd) && logger) {
97+
logger.log('Warning: "rootDir" from local tsconfig.json is overriden')
98+
}
99+
configParseResult.options.rootDir = cwd;
97100

98101
return configParseResult.options
99102
}

0 commit comments

Comments
 (0)