From: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 06:47:11 +0000 (+0000) Subject: chore: update X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7588b4dacf309c1853937df3eebc995826ffee36;p=thirdparty%2Fvuejs%2Fcore.git chore: update --- diff --git a/packages/compiler-sfc/src/script/resolveType.ts b/packages/compiler-sfc/src/script/resolveType.ts index 63ef30b3a..ae7bcbfe1 100644 --- a/packages/compiler-sfc/src/script/resolveType.ts +++ b/packages/compiler-sfc/src/script/resolveType.ts @@ -1030,12 +1030,11 @@ function resolveWithTS( matchedConfig = configs[0] } else { const [major, minor] = ts.versionMajorMinor.split('.').map(Number) - function getPattern(base: string, p: string): string { - const supportsConfigDir = - major > 5 || (major === 5 && minor >= 5) + const getPattern = (base: string, p: string) => { + // ts 5.5+ supports ${configDir} in paths + const supportsConfigDir = major > 5 || (major === 5 && minor >= 5) return p.startsWith('${configDir}') && supportsConfigDir - ? // ts 5.5+ supports ${configDir} in paths - normalizePath(p.replace('${configDir}', dirname(configPath!))) + ? normalizePath(p.replace('${configDir}', dirname(configPath!))) : joinPaths(base, p) } // resolve which config matches the current file