fix(compiler-sfc): fix expose codegen edge case (#4919)

fix #4917
This commit is contained in:
edison
2021-11-15 11:22:53 +08:00
committed by GitHub
parent b4eb7e3866
commit 31fd590fd4
4 changed files with 66 additions and 66 deletions

View File

@@ -1376,7 +1376,7 @@ export function compileScript(
// <script setup> components are closed by default. If the user did not
// explicitly call `defineExpose`, call expose() with no args.
const exposeCall =
hasDefineExposeCall || options.inlineTemplate ? `` : ` expose()\n`
hasDefineExposeCall || options.inlineTemplate ? `` : ` expose();\n`
if (isTS) {
// for TS, make sure the exported type is still valid type with
// correct props information