@@ -85,7 +85,18 @@ The `syncVercelEnvVars` build extension syncs environment variables from your Ve
8585 environment variable values will be read from ` process.env ` instead of fetching them from the
8686 Vercel API. This is determined by checking if the ` VERCEL ` environment variable is present. The
8787 API is still used to determine which environment variables are configured for your project, but
88- the actual values come from the local environment.
88+ the actual values come from the local environment. Reading values from ` process.env ` allows the
89+ extension to use values that Vercel integrations (such as the Neon integration) set per preview
90+ deployment in the "Provisioning Integrations" phase that happens just before the Vercel build
91+ starts.
92+ </Note >
93+
94+ <Note >
95+ If you have the Neon database Vercel integration installed and are running builds outside of the
96+ Vercel environment, we recommend using ` syncNeonEnvVars ` in addition to ` syncVercelEnvVars ` for your
97+ database environment variables. This ensures that the correct database connection strings are used for your
98+ selected environment and current branch, as ` syncVercelEnvVars ` may not accurately reflect
99+ branch-specific database credentials when run locally.
89100</Note >
90101
91102``` ts
@@ -139,9 +150,17 @@ The `syncNeonEnvVars` build extension syncs environment variables from your Neon
139150 Vercel integration already handles environment variable synchronization in Vercel environments.
140151</Note >
141152
153+ <Note >
154+ If you have the Neon database Vercel integration installed and are running builds outside of the
155+ Vercel environment, we recommend using ` syncNeonEnvVars ` in addition to ` syncVercelEnvVars ` for your
156+ database environment variables. This ensures that the correct database connection strings are used for your
157+ selected environment and current branch, as ` syncVercelEnvVars ` may not accurately reflect
158+ branch-specific database credentials when run locally.
159+ </Note >
160+
142161<Note >
143162 This extension is skipped for ` prod ` environments. It is designed to sync branch-specific
144- database connections for preview/staging/dev environments.
163+ database connections for preview/staging environments.
145164</Note >
146165
147166``` ts
0 commit comments