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) <noreply@anthropic.com>
This commit is contained in:
parent
282ac72c14
commit
cee79eedb3
1 changed files with 4 additions and 2 deletions
|
|
@ -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<DeploymentsLocal>('../../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<DeploymentsLocal>('../../onchain/deployments-local{.json}', {
|
||||
eager: true,
|
||||
import: 'default',
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue