Skip to content

Commit

Permalink
fix: template slots type missing when script tag has export default
Browse files Browse the repository at this point in the history
close #1389
  • Loading branch information
johnsoncodehk committed Jun 4, 2022
1 parent 6d4cf55 commit d6db872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-code-gen/src/generators/script.ts
Expand Up @@ -326,7 +326,7 @@ export function generate(

if (scriptRanges?.exportDefault && scriptRanges.exportDefault.expression.start !== scriptRanges.exportDefault.args.start) {
// use defineComponent() from user space code if it exist
codeGen.addText(`return `);
codeGen.addText(`const __VLS_Component = `);
addVirtualCode('script', scriptRanges.exportDefault.expression.start, scriptRanges.exportDefault.args.start);
codeGen.addText(`{\n`);
}
Expand Down

0 comments on commit d6db872

Please sign in to comment.