fix(nuxt): correctly remove extension from path in hasSuffix (#26725)

This commit is contained in:
Damian Głowala 2024-04-11 08:23:14 +02:00 committed by GitHub
parent 30e27f48d1
commit dec7191ac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ export function getNameFromPath (path: string, relativeTo?: string) {
} }
export function hasSuffix (path: string, suffix: string) { export function hasSuffix (path: string, suffix: string) {
return basename(path).replace(extname(path), '').endsWith(suffix) return basename(path, extname(path)).endsWith(suffix)
} }
export function resolveComponentNameSegments (fileName: string, prefixParts: string[]) { export function resolveComponentNameSegments (fileName: string, prefixParts: string[]) {