diff --git a/packages/nuxt/src/components/templates.ts b/packages/nuxt/src/components/templates.ts index d74119e106..8f162cea98 100644 --- a/packages/nuxt/src/components/templates.ts +++ b/packages/nuxt/src/components/templates.ts @@ -79,7 +79,7 @@ export const componentsTypeTemplate: NuxtTemplate = { ]) return `// Generated by components discovery -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { ${componentTypes.map(([pascalName, type]) => ` '${pascalName}': ${type}`).join('\n')} ${componentTypes.map(([pascalName, type]) => ` 'Lazy${pascalName}': ${type}`).join('\n')} diff --git a/packages/nuxt/src/head/runtime/plugin.ts b/packages/nuxt/src/head/runtime/plugin.ts index 7d945fc735..c537bc2038 100644 --- a/packages/nuxt/src/head/runtime/plugin.ts +++ b/packages/nuxt/src/head/runtime/plugin.ts @@ -6,8 +6,8 @@ import { defineNuxtPlugin, useNuxtApp } from '#app' import { appHead } from '#build/nuxt.config.mjs' type MetaComponents = typeof Components -declare module 'vue' { - export interface GlobalComponents extends MetaComponents { } +declare module '@vue/runtime-core' { + export interface GlobalComponents extends MetaComponents {} } const metaMixin = { diff --git a/packages/nuxt/src/pages/runtime/router.ts b/packages/nuxt/src/pages/runtime/router.ts index b760edf87f..03bc591227 100644 --- a/packages/nuxt/src/pages/runtime/router.ts +++ b/packages/nuxt/src/pages/runtime/router.ts @@ -18,7 +18,7 @@ import routerOptions from '#build/router.options' // @ts-ignore import { globalMiddleware, namedMiddleware } from '#build/middleware' -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { NuxtPage: typeof NuxtPage /** @deprecated */