Skip to content

fix(frontend): set empty VITE_API_ENDPOINT for production builds#516

Open
lgelauff wants to merge 1 commit intomasterfrom
fix/toolforge-vite-api-endpoint-master
Open

fix(frontend): set empty VITE_API_ENDPOINT for production builds#516
lgelauff wants to merge 1 commit intomasterfrom
fix/toolforge-vite-api-endpoint-master

Conversation

@lgelauff
Copy link
Copy Markdown
Collaborator

Summary

  • Adds frontend/.env.production with VITE_API_ENDPOINT= (empty string)
  • Fixes Toolforge builds broken since Add CORS #277 (Add CORS): without this file, .env is gitignored on Toolforge so VITE_API_ENDPOINT is undefined, making Axios baseURL resolve to undefined/v1/ and breaking all API calls
  • With this fix, production builds correctly use /v1/ as a relative same-domain baseURL

Test plan

  • Built on montage-dev with toolforge jobs run npm-build --image node20 --mem 4Gi
  • No undefined/v1/ errors in browser console
  • Login flow works on montage-dev (verified 2026-04-20)

🤖 Generated with Claude Code

Without frontend/.env.production, the .env file is gitignored on
Toolforge so VITE_API_ENDPOINT is undefined at build time, causing
Axios baseURL to resolve to undefined/v1/ and breaking all API calls.

Verified working on montage-dev (2026-04-20).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant