File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414 switched esbuild output from CJS to ESM (fixes ` "type": "module" ` conflict),
1515 and changed the output path from ` api/index.js ` to ` api/[[...route]].js ` .
1616 Updated rewrites to match: ` /api/:path* ` → ` /api/[[...route]] ` .
17+ Added post-bundle cleanup to remove the ` .ts ` stub so Vercel's
18+ ` @vercel/node ` builder uses the self-contained esbuild bundle instead of
19+ compiling the stub (which would fail with ` ERR_MODULE_NOT_FOUND ` ).
1720- ** Studio CORS error on Vercel temporary/preview domains** — Changed
1821 ` VITE_SERVER_URL ` from hardcoded ` https://play.objectstack.ai ` to ` "" `
1922 (empty string / same-origin) in ` vercel.json ` so each deployment — including
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ cd apps/studio
2626
2727# 2. Bundle API serverless function
2828node scripts/bundle-api.mjs
29+ # Remove the TS source file so Vercel's @vercel/node builder uses the
30+ # pre-bundled JS directly. Without this, Vercel compiles the TS stub
31+ # itself, producing a thin re-export that references ../server/index —
32+ # a file that doesn't exist at runtime (ERR_MODULE_NOT_FOUND).
33+ rm -f " api/[[...route]].ts"
2934
3035# 3. Copy Vite build output to public/ for static file serving
3136rm -rf public
You can’t perform that action at this time.
0 commit comments