fix: serve studio at /_studio in Vercel deployment instead of public root#1165
Closed
fix: serve studio at /_studio in Vercel deployment instead of public root#1165
Conversation
- Modified build-vercel.sh to copy studio to api/_studio instead of public/ - Updated vercel.json to include api/_studio in includeFiles - Configured static file serving at /_studio in server/index.ts - Removed SPA rewrite from vercel.json Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/0d153df4-77aa-4de3-8c31-388b75929c38 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Claude created this pull request from a session on behalf of
hotlong
April 16, 2026 08:37
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| // Serve studio at /_studio | ||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = dirname(__filename); | ||
| const studioPath = join(__dirname, '_studio'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在 Vercel 部署中,studio 应该运行在
/_studio路径,而不是复制到 public 根目录。Changes
Build script (
apps/server/scripts/build-vercel.sh)api/_studio/instead ofpublic/Vercel configuration (
apps/server/vercel.json)includeFilestoapi/{node_modules,_studio}/**/((?!api/).*) → /index.htmlServer entrypoint (
apps/server/server/index.ts)/_studiopath usingserveStaticArchitecture
Studio is now served as part of the serverless function at
/_studiorather than as static files inpublic/. This keeps the deployment self-contained within the API function.