diff --git a/packages/nuxt/src/core/templates.ts b/packages/nuxt/src/core/templates.ts index d4fe5166f8..ed2dee8054 100644 --- a/packages/nuxt/src/core/templates.ts +++ b/packages/nuxt/src/core/templates.ts @@ -285,7 +285,7 @@ export const layoutTemplate: NuxtTemplate = { filename: 'layouts.mjs', getContents ({ app }) { const layoutsObject = genObjectFromRawEntries(Object.values(app.layouts).map(({ name, file }) => { - return [name, `defineAsyncComponent(${genDynamicImport(file)})`] + return [name, `defineAsyncComponent(${genDynamicImport(file, { interopDefault: true })})`] })) return [ `import { defineAsyncComponent } from 'vue'`,