mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
fix(nuxt): interopDefault for page component imports (#6468)
This commit is contained in:
parent
bf3511c2c3
commit
3e27c1c52b
@ -237,7 +237,7 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set<string> =
|
|||||||
children: route.children ? normalizeRoutes(route.children, metaImports).routes : [],
|
children: route.children ? normalizeRoutes(route.children, metaImports).routes : [],
|
||||||
meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName,
|
meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName,
|
||||||
alias: `${metaImportName}?.alias || []`,
|
alias: `${metaImportName}?.alias || []`,
|
||||||
component: genDynamicImport(file)
|
component: genDynamicImport(file, { interopDefault: true })
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
@ -34,10 +34,9 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Split server bundle into multiple chunks and dynamically import them
|
* Split server bundle into multiple chunks and dynamically import them
|
||||||
*
|
*
|
||||||
* Note: Enabling this flag can cause hydration issues in some platform.
|
|
||||||
*
|
*
|
||||||
* @see https://github.com/nuxt/framework/issues/6432
|
* @see https://github.com/nuxt/framework/issues/6432
|
||||||
*/
|
*/
|
||||||
viteServerDynamicImports: false,
|
viteServerDynamicImports: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user