mirror of
https://github.com/fergalmoran/mixyboos.git
synced 2026-01-06 08:54:51 +00:00
Fix vercel build
This commit is contained in:
@@ -11,13 +11,7 @@ export const env = createEnv({
|
||||
process.env.NODE_ENV === "production"
|
||||
? z.string().min(1)
|
||||
: z.string().min(1).optional(),
|
||||
NEXTAUTH_URL: z.preprocess(
|
||||
// This makes Vercel deployments not fail if you don't set NEXTAUTH_URL
|
||||
// Since NextAuth.js automatically uses the VERCEL_URL if present.
|
||||
(str) => process.env.VERCEL_URL ?? str,
|
||||
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
|
||||
process.env.VERCEL ? z.string().min(1) : z.string().url()
|
||||
),
|
||||
NEXTAUTH_URL: z.string().url(),
|
||||
JWT_SECRET: z.string(),
|
||||
// Add `.min(1) on ID and SECRET if you want to make sure they're not empty
|
||||
GOOGLE_CLIENT_ID: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user