mirror of https://github.com/vuejs/core.git
chore: update
This commit is contained in:
parent
5246bdfe53
commit
7588b4dacf
|
@ -1030,12 +1030,11 @@ function resolveWithTS(
|
||||||
matchedConfig = configs[0]
|
matchedConfig = configs[0]
|
||||||
} else {
|
} else {
|
||||||
const [major, minor] = ts.versionMajorMinor.split('.').map(Number)
|
const [major, minor] = ts.versionMajorMinor.split('.').map(Number)
|
||||||
function getPattern(base: string, p: string): string {
|
const getPattern = (base: string, p: string) => {
|
||||||
const supportsConfigDir =
|
// ts 5.5+ supports ${configDir} in paths
|
||||||
major > 5 || (major === 5 && minor >= 5)
|
const supportsConfigDir = major > 5 || (major === 5 && minor >= 5)
|
||||||
return p.startsWith('${configDir}') && supportsConfigDir
|
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)
|
: joinPaths(base, p)
|
||||||
}
|
}
|
||||||
// resolve which config matches the current file
|
// resolve which config matches the current file
|
||||||
|
|
Loading…
Reference in New Issue