Skip to content

Commit

Permalink
fix: avoid error from await import('vue') virtual code
Browse files Browse the repository at this point in the history
close #1263
  • Loading branch information
johnsoncodehk committed May 5, 2022
1 parent e7c8c52 commit 7b5cea0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vue-code-gen/src/generators/script.ts
Expand Up @@ -275,6 +275,7 @@ export function generate(
codeGen.addText(`);\n`);
}

codeGen.addText(`// @ts-ignore\n`); // fix https://github.com/johnsoncodehk/volar/issues/1263
codeGen.addText(`return (await import('${vueLibName}')).defineComponent({\n`);

if (script && scriptRanges?.exportDefault?.args) {
Expand Down

0 comments on commit 7b5cea0

Please sign in to comment.