mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
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.
7 lines
277 B
TypeScript
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)
|