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
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export function getNameFromPath (path: string, relativeTo?: 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[]) {