fix(nuxt3): fix layout suspense loading (#3670)

This commit is contained in:
Daniel Roe 2022-03-15 11:22:25 +00:00 committed by GitHub
parent 505acb820a
commit 3e0a3ed247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ export const layoutTemplate: NuxtTemplate = {
filename: 'layouts.mjs',
getContents ({ app }) {
const layoutsObject = genObjectFromRawEntries(Object.values(app.layouts).map(({ name, file }) => {
return [name, `defineAsyncComponent({ suspensible: false, loader: ${genDynamicImport(file)} })`]
return [name, `defineAsyncComponent(${genDynamicImport(file)})`]
}))
return [
'import { defineAsyncComponent } from \'vue\'',