Skip to content

Commit

Permalink
Only respect top level base url
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos authored and plantain-00 committed Oct 31, 2020
1 parent ea8f882 commit 1b5f6f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/utils/src/tsconfig.ts
Expand Up @@ -96,8 +96,9 @@ async function getTsConfig(configFilePath: string, dirname: string): Promise<Jso
}
const { configFilePath, dirname: extendsBasename } = getTsConfigFilePath(project, fallbackProjects)
const extendsConfig = await getTsConfig(configFilePath, extendsBasename)
const topLevelBaseUrl = config.compilerOptions ? config.compilerOptions.baseUrl : undefined
config.compilerOptions = { ...extendsConfig.compilerOptions, ...config.compilerOptions }
config.basePath = config.compilerOptions.baseUrl || extendsBasename;
config.basePath = topLevelBaseUrl ? dirname : extendsBasename;
}
return config
}
Expand Down

0 comments on commit 1b5f6f3

Please sign in to comment.