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

This commit is contained in:
edison 2025-06-26 14:46:21 +08:00 committed by GitHub
parent 48a1370405
commit 2074d66c90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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}`,