mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
fix(nuxt): correctly remove extension from path in hasSuffix
(#26725)
This commit is contained in:
parent
30e27f48d1
commit
dec7191ac5
@ -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[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user