2026-10-26
What to check when a Lovable app works in preview and fails on the deployed URL.
Lovable preview often points at a project with open policies and seed data. The deployed site points at different environment variables. Auth redirects, Supabase URL, and the anon key have to match the project you intend to ship.
If login works in preview and loops in production, compare the site URL in the Supabase auth settings with the deployed origin, including www and https.
Generated projects pin floating dependencies and import files that only exist because the preview bundler was lenient. A production build with TypeScript strict mode fails on those. Fix the types. Do not set `ignoreBuildErrors` to get a green deploy.
Server-only packages imported from a client component will fail the build or leak into the browser. Move that import behind a server module.
A green deploy is not a launch. Hit the authenticated routes with two users. Confirm one cannot read the other's rows. Watch the function logs for the first real session, not the seed account.