wip: fix compileScript script/script-setup co-usage

This commit is contained in:
Evan You
2020-11-19 16:17:54 -05:00
parent a9424354b0
commit 08879cc3b5
3 changed files with 63 additions and 2 deletions

View File

@@ -921,7 +921,7 @@ export function compileScript(
hasAwait ? `async ` : ``
}setup(${args}) {\n`
)
s.append(`})`)
s.appendRight(endOffset, `})`)
} else {
if (defaultExport) {
// can't rely on spread operator in non ts mode
@@ -939,7 +939,7 @@ export function compileScript(
`\nexport default {${runtimeOptions}\n ` +
`${hasAwait ? `async ` : ``}setup(${args}) {\n`
)
s.append(`}`)
s.appendRight(endOffset, `}`)
}
}