In vue3, my template is like this
<template>
<v-app>
</v-app>
</template>
<script setup lang="ts">
...
const a = await Setup();
</script>
But I get this warning
[Vue warn]: Component <Anonymous>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.
at <App>
How can I resolve this?
A good way would be to create a wrapper on the fly in the
main.js
file and use it to wrapApp
withSuspense
like so:// main.js