File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ declare global {
2121}
2222
2323function warnAboutMissingEnvironmentVariables ( ) {
24- const nodeEnvironment = process . env . NODE_ENV ;
25- const vercelEnvironment = process . env . VERCEL_ENV ;
26- let checkEnabled =
27- nodeEnvironment !== 'development' && vercelEnvironment !== 'preview' && vercelEnvironment !== 'development' ;
24+ const nodeDevEnv = process . env . NODE_ENV === 'development' ;
25+ const vercelDevEnv = process . env . VERCEL_ENV === 'preview' || process . env . VERCEL_ENV === 'development' ;
26+ const vercelNonProdBuild = process . env . VERCEL_ENV !== 'production' && process . env . __VERCEL_BUILD_RUNNING === '1' ;
27+ let checkEnabled = ! nodeDevEnv && ! vercelDevEnv && ! vercelNonProdBuild ;
2828 if ( process . env . LOGTAIL_CHECK_ENV_VARS ?. toLowerCase ( ) === 'true' || process . env . LOGTAIL_CHECK_ENV_VARS === '1' ) {
2929 checkEnabled = true ;
3030 }
You can’t perform that action at this time.
0 commit comments