Nuxt/packages/nuxt3/src/app/components/nuxt-root.vue

20 lines
444 B
Vue
Raw Normal View History

<template>
<Suspense>
<App />
</Suspense>
</template>
<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.')
}
}
}
</script>