mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
Next's redirects() carries the incoming query string and hash through to the redirect destination; the TanStack beforeLoad redirects dropped them — deep links like /project/x/sql/quickstarts?template=... lost the template on the rewrite to /sql/examples, and /?next=new-project&projectName=foo lost projectName. matchRedirect (redirects.shared.ts) now merges the incoming query and hash onto the destination via a new pure preserveQueryAndHash helper: params already set on the destination win, keys the rule matched on (`has`) are consumed, and a destination hash (e.g. billing#invoices) wins over the incoming one. The `/` index route redirect does the same, consuming `next` only when it matched. The shared module stays runtime-agnostic; the config consumers (next.config.ts / vercel.ts) only import the tables and are unaffected. Claude-Session: https://claude.ai/code/session_01MLH8WVg8zBJnmZTYTV3ooo