mirror of https://github.com/nuxt/nuxt.git
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