Knowledge Base/Uniform CLI and environment variables in environment-specific .env files, such as .env.local

Uniform CLI and environment variables in environment-specific .env files, such as .env.local

known issueDeveloperCLI

Uniform CLI uses only the root .env file to read the environment variables from files. You can add the file selection logic to a uniform.cofig.ts like this

uniform.config.ts

import type { CLIConfiguration } from '@uniformdev/cli'; import * as dotenv from 'dotenv'; dotenv.config({ path: `.env.local` }); const config: CLIConfiguration = { ...
Last modified: January 6, 2025