Skip to content

Fix Studio server mode for app-host Vercel deployment#1134

Merged
xuyushun441-sys merged 1 commit intomainfrom
claude/configure-studio-server-mode
Apr 14, 2026
Merged

Fix Studio server mode for app-host Vercel deployment#1134
xuyushun441-sys merged 1 commit intomainfrom
claude/configure-studio-server-mode

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 14, 2026

Studio was running in MSW mode after deploying app-host to Vercel, instead of connecting to the API server. The issue was that VITE_RUNTIME_MODE=server was not being set during the build process.

Changes

  • Add build.env to examples/app-host/vercel.json: Set VITE_RUNTIME_MODE=server and VITE_SERVER_URL="" to configure Studio in server mode during Vite build
  • Update deployment documentation: Document build environment variables and add troubleshooting section for Studio MSW mode issues

Technical Context

Vite embeds environment variables at build time. The standalone Studio deployment (apps/studio/vercel.json) already had this configuration:

"build": {
  "env": {
    "VITE_RUNTIME_MODE": "server",
    "VITE_SERVER_URL": ""
  }
}

The app-host deployment was missing this section, causing Studio to default to MSW mode regardless of the .env.production file (which is only used during local builds, not Vercel builds).

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-demo Ready Ready Preview, Comment Apr 14, 2026 7:01am
objectstack-play Ready Ready Preview, Comment Apr 14, 2026 7:01am
spec Ready Ready Preview, Comment Apr 14, 2026 7:01am

Request Review

@github-actions github-actions bot added documentation Improvements or additions to documentation size/s labels Apr 14, 2026
@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review April 14, 2026 07:00
@xuyushun441-sys xuyushun441-sys merged commit 5525dd9 into main Apr 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants