wip: fix default export side effect handling

This commit is contained in:
Evan You 2020-11-19 16:58:07 -05:00
parent 08879cc3b5
commit 6806facfa1

View File

@ -930,8 +930,7 @@ export function compileScript(
`\n${hasAwait ? `async ` : ``}function setup(${args}) {\n` `\n${hasAwait ? `async ` : ``}function setup(${args}) {\n`
) )
s.append( s.append(
`\n/*#__PURE__*/ Object.assign(${defaultTempVar}, {${runtimeOptions}\n setup\n})\n` + `\nexport default /*#__PURE__*/ Object.assign(${defaultTempVar}, {${runtimeOptions}\n setup\n})\n`
`export default ${defaultTempVar}`
) )
} else { } else {
s.prependLeft( s.prependLeft(