diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 31e92fb0..918e3f8d 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -930,8 +930,7 @@ export function compileScript( `\n${hasAwait ? `async ` : ``}function setup(${args}) {\n` ) s.append( - `\n/*#__PURE__*/ Object.assign(${defaultTempVar}, {${runtimeOptions}\n setup\n})\n` + - `export default ${defaultTempVar}` + `\nexport default /*#__PURE__*/ Object.assign(${defaultTempVar}, {${runtimeOptions}\n setup\n})\n` ) } else { s.prependLeft(