Skip to content

Commit 92523f2

Browse files
committed
fix(language-core): don't default vueCompilerOptions.lib to @vue/runtime-dom for Vue 2
1 parent 194e77c commit 92523f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/language-core/lib/utils/ts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function getPartialVueCompilerOptions(
205205

206206
export function resolveVueCompilerOptions(vueOptions: Partial<VueCompilerOptions>): VueCompilerOptions {
207207
const target = vueOptions.target ?? 3.3;
208-
const lib = vueOptions.lib || (target < 2.7 ? '@vue/runtime-dom' : 'vue');
208+
const lib = vueOptions.lib ?? 'vue';
209209
return {
210210
...vueOptions,
211211
target,
@@ -222,7 +222,7 @@ export function resolveVueCompilerOptions(vueOptions: Partial<VueCompilerOptions
222222
optionsWrapper: vueOptions.optionsWrapper ?? (
223223
target >= 2.7
224224
? [`(await import('${lib}')).defineComponent(`, `)`]
225-
: [`(await import('vue')).default.extend(`, `)`]
225+
: [`(await import('${lib}')).default.extend(`, `)`]
226226
),
227227
macros: {
228228
defineProps: ['defineProps'],

packages/language-core/schemas/vue-tsconfig.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"lib": {
3535
"default": "vue",
36-
"markdownDescription": "Specify module name for import regular types. (If empty, will use `@vue/runtime-dom` for target < 2.7, `vue` for target >= 2.7)"
36+
"markdownDescription": "Specify module name for import regular types."
3737
},
3838
"jsxSlots": {
3939
"type": "boolean",

0 commit comments

Comments
 (0)