Next.js Discord

Discord Forum

How to expose VERCEL_GIT_COMMIT_SHA to client?

Answered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
I need to pass this to the project's Sentry config on the client but nexjts only exposes env vars prefixed with NEXT_PUBLIC_. How can I expose this env var to the client?
Answered by joulev
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA
View full answer

4 Replies

Answer
yes, it's just that. Vercel automatically exposes NEXT_PUBLIC_ variants as well
Cape lionOP
ahhh, I hadn't realised that, perfect