feat: better

This commit is contained in:
Dunqing 2023-09-09 10:05:25 +08:00
parent 693d9a64b5
commit 4b6d828a4f

View File

@ -72,9 +72,8 @@ export async function resolveConfigPaths(cwd: string, config: RawConfig) {
// If no paths were found, try to load tsconfig.app.json.
if ('paths' in tsConfig && Object.keys(tsConfig.paths).length === 0) {
const FALLBACK_TSCONFIG_PATH = path.resolve(cwd, './tsconfig.app.json')
if (!existsSync(FALLBACK_TSCONFIG_PATH))
return
tsConfig = loadConfig(FALLBACK_TSCONFIG_PATH)
if (existsSync(FALLBACK_TSCONFIG_PATH))
tsConfig = loadConfig(FALLBACK_TSCONFIG_PATH)
}
if (tsConfig.resultType === 'failed') {