fix(compiler-sfc): always use defineComponent in SSR mode

This commit is contained in:
daiwei 2025-06-25 11:06:33 +08:00
parent c86bf7b11f
commit 5a487cfd66
1 changed files with 1 additions and 1 deletions

View File

@ -984,7 +984,7 @@ export function compileScript(
ctx.s.prependLeft(
startOffset,
`\n${genDefaultAs} /*@__PURE__*/${ctx.helper(
vapor ? `defineVaporComponent` : `defineComponent`,
vapor && !ssr ? `defineVaporComponent` : `defineComponent`,
)}({${def}${runtimeOptions}\n ${
hasAwait ? `async ` : ``
}setup(${args}) {\n${exposeCall}`,