diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index fe5a104c1c..208bc2ca35 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -145,7 +145,9 @@ function* generateTemplateBody( } else { yield `// no template${newLine}`; - yield `const __VLS_slots = {}${endOfLine}`; + if (!options.scriptSetupRanges?.slots.define) { + yield `const __VLS_slots = {}${endOfLine}`; + } yield `const $refs = {}${endOfLine}`; yield `const __VLS_inheritedAttrs = {}${endOfLine}`; }