We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 912f69d commit a629054Copy full SHA for a629054
packages/vue-code-gen/src/generators/script.ts
@@ -331,7 +331,7 @@ export function generate(
331
codeGen.addText(`{\n`);
332
}
333
else {
334
- codeGen.addText(`return (await import('${vueLibName}')).defineComponent({\n`);
+ codeGen.addText(`const __VLS_Component = (await import('${vueLibName}')).defineComponent({\n`);
335
336
337
if (scriptSetup && scriptSetupRanges) {
@@ -512,6 +512,7 @@ export function generate(
512
513
514
codeGen.addText(`});\n`);
515
+ codeGen.addText(`return {} as new () => InstanceType<typeof __VLS_Component> & { $slots: typeof import('./${path.basename(fileName)}.__VLS_template').default };\n`);
516
codeGen.addText(`})();`);
517
exportdefaultEnd = codeGen.getText().length;
518
0 commit comments