Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 4m2s
11 lines
349 B
TypeScript
11 lines
349 B
TypeScript
import dotenv from 'dotenv';
|
|
import path from 'path';
|
|
|
|
/**
|
|
* Loads environment variables from .env file in development.
|
|
* This must be called before any other module that uses environment variables.
|
|
*/
|
|
if (typeof window === 'undefined' && process.env.NODE_ENV !== 'production') {
|
|
dotenv.config({ path: path.resolve(process.cwd(), '.env') });
|
|
}
|