Vercel should allow variable referencing

When building applications with vercel, sometimes we want to expose vercel system environment variables to the client, or building variables from parts

For example, I want to use the VERCEL_GIT_COMMIT_REF in my client-side frontend as PUBLIC_NAMESPACE for SvelteKit to allow it.

Sometimes, you may also want to do things like

DB_PORT=8000
DB_HOST=example.com
DB_ENDPOINT=https://$DB_HOST:$DB_PORT/path

Currently it doesn’t seem possible to achieve something like this.

See also:

Thanks for the suggestion! I’ve passed this feedback to the engineering team to consider for a feature update.

With Svelte, I would actually recommend using the steps outlined in the SvelteKit docs if you want to expose system env vars to the client: Vercel • Docs • SvelteKit

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.