mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(nuxt): de-default async layout components (#30203)
This commit is contained in:
parent
231b7d17c3
commit
bfcf80a12a
@ -285,7 +285,7 @@ export const layoutTemplate: NuxtTemplate = {
|
|||||||
filename: 'layouts.mjs',
|
filename: 'layouts.mjs',
|
||||||
getContents ({ app }) {
|
getContents ({ app }) {
|
||||||
const layoutsObject = genObjectFromRawEntries(Object.values(app.layouts).map(({ name, file }) => {
|
const layoutsObject = genObjectFromRawEntries(Object.values(app.layouts).map(({ name, file }) => {
|
||||||
return [name, `defineAsyncComponent(${genDynamicImport(file)})`]
|
return [name, `defineAsyncComponent(${genDynamicImport(file, { interopDefault: true })})`]
|
||||||
}))
|
}))
|
||||||
return [
|
return [
|
||||||
`import { defineAsyncComponent } from 'vue'`,
|
`import { defineAsyncComponent } from 'vue'`,
|
||||||
|
Loading…
Reference in New Issue
Block a user