From 6c9743c1a615e9bd0896261616fa6c6addb23c24 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 4 Nov 2025 12:34:41 -0800 Subject: [PATCH] fix(vite): use dynamic base URL based on cloud distribution (#6562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Replace hardcoded `` 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) --- vite.config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.mts b/vite.config.mts index 188b0a314..fdeadc086 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -131,7 +131,7 @@ const gcsRedirectProxyConfig: ProxyOptions = { } export default defineConfig({ - base: '', + base: DISTRIBUTION === 'cloud' ? '/' : '', server: { host: VITE_REMOTE_DEV ? '0.0.0.0' : undefined, watch: {