Preview and staging deployments can now be routed automatically to the correct Supabase database branch. Instead of manually mapping dynamic environment variables inside the Vercel dashboard, branch-specific connection strings and API keys are fetched and injected directly during the build process.
A new evaluates the active Git branch to pull matching PostgreSQL configurations and secrets. Production builds default to the main branch credentials, while local development environments are explicitly skipped. Alongside this update, configuration errors are prevented by for Vercel staging deployments until a custom environment is specifically mapped to the project.
To use this feature, the extension is passed into the project configuration file alongside the required authentication tokens. Here is how it is configured:
1import { defineConfig } from "@trigger.dev/sdk";2import { syncSupabaseEnvVars } from "@trigger.dev/build/extensions/core";34export default defineConfig({5 build: {6 extensions: [syncSupabaseEnvVars()],7 },8});
