loadTSConfig 加载TS配置文件
loadTSConfig
类型: MethodDeclaration
定义位置: data.ts
描述
加载TS配置文件
返回值
类型: Promise<void>
源代码
位置: 第 1019 行
public async loadTSConfig(): Promise<void> {
if (!this.config.deployed) {
const tsconfig = await Loader.get({
path: 'tsconfig.json',
type: 'text',
})
const match = tsconfig.match(/"outDir"\s*:\s*"(.*?)"/)
if (!match) {
throw new Error('Unable to get "outDir" from "tsconfig.json".')
}
this.tsOutDir = match[1]
if (!/\/$/.test(this.tsOutDir)) {
this.tsOutDir += '/'
}
}
}
文档生成时间:2025/7/7 12:07:06