From cee79eedb3a9856740f10b56859e731c0210cbf4 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 20 Mar 2026 10:45:13 +0000 Subject: [PATCH] fix: web-app config.ts fails when deployments-local.json is absent Use brace expansion in import.meta.glob pattern so Vite treats it as a dynamic glob (returns {} when no files match) instead of compiling it to a static import that errors when the gitignored file is absent in CI. Co-Authored-By: Claude Opus 4.6 (1M context) --- web-app/src/config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web-app/src/config.ts b/web-app/src/config.ts index e36e364..fffa964 100644 --- a/web-app/src/config.ts +++ b/web-app/src/config.ts @@ -19,8 +19,10 @@ interface DeploymentsLocal { infrastructure?: DeploymentInfrastructure; } -// deployments-local.json is gitignored (local dev only); fall back to empty if absent (CI, production) -const _localFiles = import.meta.glob('../../onchain/deployments-local.json', { +// deployments-local.json is gitignored (generated per-run by bootstrap scripts). +// Use a glob pattern (brace expansion) so Vite treats it as dynamic — returns {} +// when the file is absent (CI, production) instead of a hard import error. +const _localFiles = import.meta.glob('../../onchain/deployments-local{.json}', { eager: true, import: 'default', });