fix(nuxt): fall back to original component filePath (#28925)

This commit is contained in:
Daniel Roe 2024-09-10 22:36:53 +01:00
parent 79773710c3
commit 9edba0d7ea
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -171,7 +171,7 @@ export default defineNuxtModule<ComponentsOptions>({
for (const component of newComponents) { for (const component of newComponents) {
if (!(component as any /* untyped internal property */)._scanned && !(component.filePath in nuxt.vfs) && !existsSync(component.filePath)) { if (!(component as any /* untyped internal property */)._scanned && !(component.filePath in nuxt.vfs) && !existsSync(component.filePath)) {
// attempt to resolve component path // attempt to resolve component path
component.filePath = await resolvePath(component.filePath) component.filePath = await resolvePath(component.filePath, { fallbackToOriginal: true })
} }
if (component.mode === 'client' && !newComponents.some(c => c.pascalName === component.pascalName && c.mode === 'server')) { if (component.mode === 'client' && !newComponents.some(c => c.pascalName === component.pascalName && c.mode === 'server')) {
newComponents.push({ newComponents.push({