Skip to content

Commit 9d96718

Browse files
committed
fix: component ast broken when use script setup with export default
close #1996
1 parent 9735e41 commit 9d96718

File tree

1 file changed

+2
-1
lines changed
  • vue-language-tools/vue-language-core/src/generators

1 file changed

+2
-1
lines changed

vue-language-tools/vue-language-core/src/generators/script.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ export function generate(
242242
0,
243243
{ diagnostic: true },
244244
]);
245-
codeGen.push('export default (');
245+
codeGen.push('export default ');
246246
}
247+
codeGen.push('(');
247248
if (vueCompilerOptions.experimentalRfc436 && sfc.scriptSetup.generic) {
248249
codeGen.push(`<`);
249250
codeGen.push([

0 commit comments

Comments
 (0)