From e2890ecbb5b1bd628bf023f954425bdfa7b1a6c8 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Mon, 6 Apr 2026 14:31:04 +0200 Subject: [PATCH] fix: don't bake demo-vault-v2 path into CI builds When CI=true, skip injecting __DEMO_VAULT_PATH__ so the CI runner's absolute path (/Users/runner/...) is never compiled into the bundle. The default vault path is resolved at runtime via get_default_vault_path. Co-Authored-By: Claude Opus 4.6 (1M context) --- vite.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 5ee35cdd..1fa707a2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -414,11 +414,11 @@ export default defineConfig({ }, }, - // Inject the demo-vault-v2 path in dev mode only — production Tauri builds must - // resolve the default vault path at runtime via the backend to avoid baking - // the CI runner's absolute path into the distributed bundle. + // Inject the demo-vault-v2 path in local dev only — production Tauri builds and + // CI must resolve the default vault path at runtime via the backend to avoid + // baking the CI runner's absolute path into the distributed bundle. define: { - ...(process.env.TAURI_PLATFORM && !process.env.TAURI_DEBUG + ...(process.env.CI || (process.env.TAURI_PLATFORM && !process.env.TAURI_DEBUG) ? {} : { __DEMO_VAULT_PATH__: JSON.stringify(path.resolve(__dirname, 'demo-vault-v2')) }), },