From fbd014f7842aa90e8260ff51128e81b8d14c1f93 Mon Sep 17 00:00:00 2001 From: Zzc <1373857752@qq.com> Date: Fri, 7 Nov 2025 16:55:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(screen):=20=E6=9B=B4=E6=96=B0=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E8=B7=AF=E5=BE=84=E8=A7=A3=E6=9E=90=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将条件从 `process.env.NODE_ENV === 'production'` 更改为 `command === 'build'`,以匹配 Vite 的 `command` 参数,从而实现准确的构建时基础路径归一化。 --- packages/screen/vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/screen/vite.config.js b/packages/screen/vite.config.js index 45298ce..95076e5 100644 --- a/packages/screen/vite.config.js +++ b/packages/screen/vite.config.js @@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => { DEFAULT_BUILD_BASE : '/' const resolvedBase = - process.env.NODE_ENV === 'production' ? normalizeBasePath(baseCandidate) : '/' + command === 'build' ? normalizeBasePath(baseCandidate) : '/' const cesiumBaseUrl = resolvedBase === '/' ? '/cesium' : `${resolvedBase}cesium` return {