fix(screen): 更新基础路径解析条件
将条件从 `process.env.NODE_ENV === 'production'` 更改为 `command === 'build'`,以匹配 Vite 的 `command` 参数,从而实现准确的构建时基础路径归一化。
This commit is contained in:
parent
67f9653829
commit
fbd014f784
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user