source.tsconfigPath
- 类型: 
string 
- 默认值: 
'tsconfig.json' 
配置自定义的 tsconfig.json 文件路径,可以是相对路径或绝对路径。
作用
tsconfig.json 配置文件影响 Rsbuild 的以下行为:
示例
source.tsconfigPath 的值可以设置为相对路径或绝对路径,相对路径将会相对于项目根目录进行解析。
rsbuild.config.ts
export default {
  source: {
    tsconfigPath: './tsconfig.custom.json',
  },
};
 
import path from 'node:path';
export default {
  source: {
    tsconfigPath: path.join(__dirname, 'tsconfig.custom.json'),
  },
};