diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index b17874e8ff..85b60fa5e1 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -205,7 +205,7 @@ function getPartialVueCompilerOptions( export function resolveVueCompilerOptions(vueOptions: Partial): VueCompilerOptions { const target = vueOptions.target ?? 3.3; - const lib = vueOptions.lib || (target < 2.7 ? '@vue/runtime-dom' : 'vue'); + const lib = vueOptions.lib ?? 'vue'; return { ...vueOptions, target, @@ -222,7 +222,7 @@ export function resolveVueCompilerOptions(vueOptions: Partial= 2.7 ? [`(await import('${lib}')).defineComponent(`, `)`] - : [`(await import('vue')).default.extend(`, `)`] + : [`(await import('${lib}')).default.extend(`, `)`] ), macros: { defineProps: ['defineProps'], diff --git a/packages/language-core/schemas/vue-tsconfig.schema.json b/packages/language-core/schemas/vue-tsconfig.schema.json index f3e756a766..dce4f299f7 100644 --- a/packages/language-core/schemas/vue-tsconfig.schema.json +++ b/packages/language-core/schemas/vue-tsconfig.schema.json @@ -33,7 +33,7 @@ }, "lib": { "default": "vue", - "markdownDescription": "Specify module name for import regular types. (If empty, will use `@vue/runtime-dom` for target < 2.7, `vue` for target >= 2.7)" + "markdownDescription": "Specify module name for import regular types." }, "jsxSlots": { "type": "boolean",