Skip to content

Commit 7588b4d

Browse files
autofix-ci[bot]edison1105
authored andcommitted
chore: update
1 parent 5246bdf commit 7588b4d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/compiler-sfc/src/script/resolveType.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,12 +1030,11 @@ function resolveWithTS(
10301030
matchedConfig = configs[0]
10311031
} else {
10321032
const [major, minor] = ts.versionMajorMinor.split('.').map(Number)
1033-
function getPattern(base: string, p: string): string {
1034-
const supportsConfigDir =
1035-
major > 5 || (major === 5 && minor >= 5)
1033+
const getPattern = (base: string, p: string) => {
1034+
// ts 5.5+ supports ${configDir} in paths
1035+
const supportsConfigDir = major > 5 || (major === 5 && minor >= 5)
10361036
return p.startsWith('${configDir}') && supportsConfigDir
1037-
? // ts 5.5+ supports ${configDir} in paths
1038-
normalizePath(p.replace('${configDir}', dirname(configPath!)))
1037+
? normalizePath(p.replace('${configDir}', dirname(configPath!)))
10391038
: joinPaths(base, p)
10401039
}
10411040
// resolve which config matches the current file

0 commit comments

Comments
 (0)