Skip to content

Commit

Permalink
Respect user baseUrl for basePath
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 3fe24fa commit 2c000f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/utils/src/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function getTsConfigFilePath(project: string, fallbackProject?: string[]) {

interface JsonConfig {
extends?: string
compilerOptions?: { [name: string]: unknown }
compilerOptions?: { baseUrl?: string; [name: string]: unknown }
include?: string[]
exclude?: string[]
files?: string[]
Expand Down Expand Up @@ -97,7 +97,7 @@ async function getTsConfig(configFilePath: string, dirname: string): Promise<Jso
const { configFilePath, dirname: extendsBasename } = getTsConfigFilePath(project, fallbackProjects)
const extendsConfig = await getTsConfig(configFilePath, extendsBasename)
config.compilerOptions = { ...extendsConfig.compilerOptions, ...config.compilerOptions }
config.basePath = extendsBasename
config.basePath = config.compilerOptions.baseUrl || extendsBasename;
}
return config
}
Expand Down

0 comments on commit 2c000f2

Please sign in to comment.