diff --git a/packages/nuxt3/src/components/templates.ts b/packages/nuxt3/src/components/templates.ts index eb4f170191..6ae0e35dd5 100644 --- a/packages/nuxt3/src/components/templates.ts +++ b/packages/nuxt3/src/components/templates.ts @@ -25,7 +25,7 @@ const createImportMagicComments = (options: ImportMagicCommentsOptions) => { export const componentsTemplate = { filename: 'components.mjs', - getContents (options: ComponentsTemplateOptions) { + getContents ({ options }: { options: ComponentsTemplateOptions }) { return `import { defineAsyncComponent } from 'vue' const components = { @@ -50,7 +50,7 @@ export default function (nuxt) { export const componentsTypeTemplate = { filename: 'components.d.ts', write: true, - getContents: (options: ComponentsTemplateOptions) => `// Generated by components discovery + getContents: ({ options }: { options: ComponentsTemplateOptions }) => `// Generated by components discovery declare module 'vue' { export interface GlobalComponents { ${options.components.map(c => ` '${c.pascalName}': typeof import('${relative(options.buildDir, c.filePath)}')['${c.export}']`).join(',\n')}