diff --git a/src/core/declaration.ts b/src/core/declaration.ts index fa6241c4..73895199 100644 --- a/src/core/declaration.ts +++ b/src/core/declaration.ts @@ -120,7 +120,7 @@ export function getDeclaration(ctx: Context, filepath: string, originalImports?: declare module 'vue' {` : `export {} -declare module 'vue' {` +declare module '@vue/runtime-core' {` let code = `/* eslint-disable */ /* prettier-ignore */ diff --git a/test/__snapshots__/dts.test.ts.snap b/test/__snapshots__/dts.test.ts.snap index ea2af4da..a7846fa9 100644 --- a/test/__snapshots__/dts.test.ts.snap +++ b/test/__snapshots__/dts.test.ts.snap @@ -8,7 +8,7 @@ exports[`dts > components only 1`] = ` // Read more: https://github.com/vuejs/core/pull/3399 export {} -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -26,7 +26,7 @@ exports[`dts > directive only 1`] = ` // Read more: https://github.com/vuejs/core/pull/3399 export {} -declare module 'vue' { +declare module '@vue/runtime-core' { export interface ComponentCustomProperties { vLoading: typeof import('test/directive/Loading')['default'] } @@ -42,7 +42,7 @@ exports[`dts > getDeclaration 1`] = ` // Read more: https://github.com/vuejs/core/pull/3399 export {} -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -118,7 +118,7 @@ exports[`dts > writeDeclaration - keep unused 1`] = ` // Read more: https://github.com/vuejs/core/pull/3399 export {} -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -142,7 +142,7 @@ exports[`dts > writeDeclaration 1`] = ` // Read more: https://github.com/vuejs/core/pull/3399 export {} -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/test/dts.test.ts b/test/dts.test.ts index b47de6b5..3e954da0 100644 --- a/test/dts.test.ts +++ b/test/dts.test.ts @@ -52,7 +52,7 @@ const _directive_loading = _resolveDirective("loading")` await writeFile( filepath, ` -declare module 'vue' { +declare module '@vue/runtime-core' { export interface GlobalComponents { SomeComp: typeof import('test/component/SomeComp')['default'] TestComp: typeof import('test/component/OldComp')['default']