2021-10-12 12:51:41 +00:00
|
|
|
<template>
|
2022-01-26 17:24:54 +00:00
|
|
|
<Suspense @resolve="onResolve">
|
2021-10-12 12:51:41 +00:00
|
|
|
<App />
|
|
|
|
</Suspense>
|
|
|
|
</template>
|
2021-12-21 14:44:35 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
import { useNuxtApp } from '#app'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup () {
|
|
|
|
const nuxtApp = useNuxtApp()
|
|
|
|
const results = nuxtApp.hooks.callHookWith(hooks => hooks.map(hook => hook()), 'vue:setup')
|
|
|
|
if (process.dev && results && results.some(i => i && 'then' in i)) {
|
|
|
|
console.error('[nuxt] Error in `vue:setup`. Callbacks must be synchronous.')
|
|
|
|
}
|
2022-01-26 17:24:54 +00:00
|
|
|
return {
|
|
|
|
onResolve: () => nuxtApp.callHook('app:suspense:resolve')
|
|
|
|
}
|
2021-12-21 14:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|