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

This commit is contained in:
Daniel Roe 2024-09-10 22:36:53 +01:00 committed by GitHub
parent cdc4a23107
commit cea69b6832
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,7 +171,7 @@ export default defineNuxtModule<ComponentsOptions>({
for (const component of newComponents) {
if (!(component as any /* untyped internal property */)._scanned && !(component.filePath in nuxt.vfs) && !existsSync(component.filePath)) {
// 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')) {
newComponents.push({