@@ -117,7 +117,7 @@ async function loadTsconfigFromExtends(
117
117
extendedConfigValue += ".json" ;
118
118
}
119
119
120
- const currentDir = path . dirname ( configFilePath ) ;
120
+ const currentDir = normalize ( path . dirname ( configFilePath ) ) ;
121
121
let extendedConfigPath = join ( currentDir , extendedConfigValue ) ;
122
122
123
123
// Check if file exists, if not try node_modules
@@ -146,7 +146,7 @@ async function loadTsconfigFromExtends(
146
146
// baseUrl should be interpreted as relative to extendedConfigPath,
147
147
// but we need to update it so it is relative to the original tsconfig being loaded
148
148
if ( compilerOptions . baseUrl ) {
149
- const extendsDir = path . dirname ( extendedConfigValue ) ;
149
+ const extendsDir = normalize ( path . dirname ( extendedConfigValue ) ) ;
150
150
compilerOptions . baseUrl = join ( extendsDir , compilerOptions . baseUrl ) ;
151
151
}
152
152
@@ -236,13 +236,16 @@ async function readTsconfigCompilerOptions(fileSystem, absTsconfigPath) {
236
236
let { baseUrl } = compilerOptions ;
237
237
238
238
if ( ! baseUrl ) {
239
- baseUrl = path . dirname ( absTsconfigPath ) ;
239
+ baseUrl = normalize ( path . dirname ( absTsconfigPath ) ) ;
240
240
} else if ( ! isAbsolute ( baseUrl ) ) {
241
- baseUrl = join ( path . dirname ( absTsconfigPath ) , baseUrl ) ;
241
+ baseUrl = join ( normalize ( path . dirname ( absTsconfigPath ) ) , baseUrl ) ;
242
242
}
243
243
244
244
const paths = compilerOptions . paths || { } ;
245
- return { options : { baseUrl, paths } , fileDependencies } ;
245
+ return {
246
+ options : { baseUrl, paths } ,
247
+ fileDependencies,
248
+ } ;
246
249
} catch ( _e ) {
247
250
return null ;
248
251
}
0 commit comments