.env.local.production Jun 2026
Maybe your local development environment ( .env.local ) points to a Docker container database. But when you are testing a production build, you might want to point it to a "Staging" cloud database that has real data. .env.local.production allows you to separate these two distinct "local" states.
NODE_ENV.local
// Order of precedence (lowest to highest priority) const files = [ .env , .env.$nodeEnv , .env.local , .env.$nodeEnv.local , .env.local.$nodeEnv // Support for the inverted pattern ]; .env.local.production