From 31239dd5b3da4427330e969e024a35ae75f6dc76 Mon Sep 17 00:00:00 2001 From: bluwy Date: Mon, 8 Jan 2024 14:33:23 +0800 Subject: [PATCH] fix: set correct `isSsrBuild` value in dev --- packages/vite/src/node/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index a8d61f03a5a090..a4c44894c8227d 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -420,7 +420,7 @@ export async function resolveConfig( const configEnv: ConfigEnv = { mode, command, - isSsrBuild: !!config.build?.ssr, + isSsrBuild: command === 'build' && !!config.build?.ssr, isPreview, }