mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): augment GlobalComponents from @vue/runtime-core
(#7448)
This commit is contained in:
parent
8bccdf44e8
commit
5893dc201f
@ -79,7 +79,7 @@ export const componentsTypeTemplate: NuxtTemplate<ComponentsTemplateContext> = {
|
||||
])
|
||||
|
||||
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')}
|
||||
|
@ -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 = {
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user