Skip to content

fix(frontend): require public env vars at build time - #276

Merged
willchen96 merged 1 commit into
mainfrom
codex/require-frontend-build-env
Jul 31, 2026
Merged

fix(frontend): require public env vars at build time#276
willchen96 merged 1 commit into
mainfrom
codex/require-frontend-build-env

Conversation

@willchen96

Copy link
Copy Markdown
Collaborator

Summary

  • fail production frontend builds when required public connection variables are missing or blank
  • validate the Supabase URL, Supabase publishable key, and backend API URL together
  • document that NEXT_PUBLIC_* values must be present during next build, not only at runtime

This prevents deploying a browser bundle that cannot connect to Supabase or the backend API.

Closes #92.
Addresses the frontend build-time configuration portion of #265.

Verification

  • missing-value production build fails with the expected list of all three variables
  • configured npm run build --prefix frontend passes
  • npm test --prefix frontend — 47 passed
  • npm run lint --prefix frontend — 0 errors (existing warnings remain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor PR #78: Frontend CSP connect-src degrades to 'self' only when env vars absent at build time

1 participant