Files
supabase/apps/studio/api/server.ts
T
Alaister Young c4cc0e0772 fix(studio): revert vercel.ts back to default export, use routes helper
The @vercel/config 0.2.1 CLI spreads named exports as top-level keys
(except a small allowlist). `export const config` ends up nested as
`{"config": {"rewrites": [...]}}` in the compiled JSON — Vercel can't
find the rewrites at the top level. Default export matches what the
implementation actually expects despite the docs example suggesting
otherwise. Also swapped plain rewrite objects for the routes.rewrite
helper for type-safety on future additions.
2026-04-22 01:31:14 +08:00

7 lines
277 B
TypeScript

// api/server.ts
// @ts-ignore - built at `vite build` time, not present in source
import handler from '../dist/server/server.js'
// eslint-disable-next-line import/no-anonymous-default-export, no-restricted-exports
export default (request: Request) => handler.fetch(request)