.env.local.production 〈FAST ✮〉

It was the naming convention. .env.local.production was a lie. A file cannot be both local and production. It cannot serve two masters. It was a ghost in the machine, born from a quick Slack reply, given power by an overeager script, and waiting for a sleepy Friday night to strike.

Enter the often-overlooked hero of the environment hierarchy: . .env.local.production

NODE_ENV.local

This works fine until you need to run a on your local machine. It was the naming convention

The framework loads .env.local first (lower priority) and then .env.production.local (higher priority). Variables from the production-local file will win. born from a quick Slack reply