vercel.js 479 B

123456789101112
  1. /**
  2. * Returns an environment setting value determined by Vercel's `VERCEL_ENV` environment variable.
  3. *
  4. * @param isClient Flag to indicate whether to use the `NEXT_PUBLIC_` prefixed version of the environment variable.
  5. */
  6. function getVercelEnv(isClient) {
  7. const vercelEnvVar = isClient ? process.env.NEXT_PUBLIC_VERCEL_ENV : process.env.VERCEL_ENV;
  8. return vercelEnvVar ? `vercel-${vercelEnvVar}` : undefined;
  9. }
  10. export { getVercelEnv };
  11. //# sourceMappingURL=vercel.js.map