t3-env
t3-env copied to clipboard
added a preset for a supabase
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
t3-env | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 17, 2024 2:40pm |
@Boby900 is attempting to deploy a commit to the t3-oss Team on Vercel.
A member of the Team first needs to authorize it.
Hey - I wasn't able to push to your branch, but could you move the variables to client and also move the preset to the nextjs package, since we're using nextjs variables here? Thanks 🙏
// packages/next/src/preset.ts
import { z } from "zod";
import { createEnv } from ".";
export * from "@t3-oss/env-core/presets";
/**
* Supabase Environment Variables
* @see https://supabase.com/docs/guides/getting-started/quickstarts/nextjs
*/
export const supabase = () =>
createEnv({
client: {
NEXT_PUBLIC_SUPABASE_URL: z.string().optional(),
NEXT_PUBLIC_SUPABASE_ANON_KEY: z.string().optional(),
},
runtimeEnv: {
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
NEXT_PUBLIC_SUPABASE_URL: process.env.SUPABASE_ANON_KEY,
},
});