diff --git a/packages/kit/src/layout.ts b/packages/kit/src/layout.ts index 01d176e968..91e50310c4 100644 --- a/packages/kit/src/layout.ts +++ b/packages/kit/src/layout.ts @@ -6,7 +6,7 @@ import { useNuxt } from './context' import { logger } from './logger' import { addTemplate } from './template' -export function addLayout (this: any, template: NuxtTemplate, name?: string) { +export function addLayout (this: any, template: NuxtTemplate | string, name?: string) { const nuxt = useNuxt() const { filename, src } = addTemplate(template) const layoutName = kebabCase(name || parse(filename).name).replace(/["']/g, '')