Skip to content

Commit 6c9743c

Browse files
fix(vite): use dynamic base URL based on cloud distribution (#6562)
## Summary - Replace hardcoded `<base href="/">` in index.html with dynamic vite base config - Set `base: DISTRIBUTION === 'cloud' ? '/' : ''` in vite.config.mts - Ensures proper asset loading across different deployment contexts ## Test plan - [ ] Verify cloud distribution builds work correctly - [ ] Verify localhost/desktop distributions work correctly - [ ] Test asset loading in both contexts ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6562-fix-vite-use-dynamic-base-URL-based-on-cloud-distribution-2a06d73d365081c8b5d2e58870ebd14d) by [Unito](https://www.unito.io)
1 parent 4ab1e82 commit 6c9743c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const gcsRedirectProxyConfig: ProxyOptions = {
131131
}
132132

133133
export default defineConfig({
134-
base: '',
134+
base: DISTRIBUTION === 'cloud' ? '/' : '',
135135
server: {
136136
host: VITE_REMOTE_DEV ? '0.0.0.0' : undefined,
137137
watch: {

0 commit comments

Comments
 (0)