]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): always use defineComponent in SSR mode (#13525)
authoredison <daiwei521@126.com>
Thu, 26 Jun 2025 06:46:21 +0000 (14:46 +0800)
committerGitHub <noreply@github.com>
Thu, 26 Jun 2025 06:46:21 +0000 (14:46 +0800)
packages/compiler-sfc/src/compileScript.ts

index 5825aa032a0ec93f656895a2c5a46b151b9bafcb..eb3b2d119c9b01e25eb104c23770a114aad91868 100644 (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}`,