fix(nuxt): use suspense for child pages on client-side navigation (#4677)

This commit is contained in:
Daniel Roe 2022-04-29 11:37:49 +02:00 committed by GitHub
parent ee64714771
commit ab3971d302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ export default defineComponent({
default: (routeProps: RouterViewSlotProps) => routeProps.Component &&
_wrapIf(Transition, routeProps.route.meta.pageTransition ?? defaultPageTransition,
wrapInKeepAlive(routeProps.route.meta.keepalive,
isNested
isNested && nuxtApp.isHydrating
// Include route children in parent suspense
? h(routeProps.Component, { key: generateRouteKey(props.pageKey, routeProps) } as {})
: h(Suspense, {