UNPKG

@sentry/core

Version:
16 lines (15 loc) • 749 B
// src/utils/vercel.ts /** * Returns the Vercel environment the code is running in, determined by the `VERCEL_TARGET_ENV` environment variable * with `VERCEL_ENV` as fallback. Returns `undefined` outside of Vercel. * * `VERCEL_TARGET_ENV` also carries the name of custom Vercel environments, whereas `VERCEL_ENV` only ever holds * `production`, `preview` or `development`. SDKs use this as the default `environment` and the bundler plugins use it * for the deploys they create, so the two stay in sync and deploys show up next to events. */ function getVercelEnv() { if (typeof process === "undefined") return; return process.env.VERCEL_TARGET_ENV || process.env.VERCEL_ENV || void 0; } export { getVercelEnv }; //# sourceMappingURL=vercel.js.map