Can anyone tell me how to use environment variables for different environments within T3 please?

I have .env which is working fine. I want to use .env.development for when I dev and .env.product when I've built and deployed. I can't see anywhere where this can be set, I can see using this the variables don't switch as I expect and simply just default to .env. I've attempted to follow the Next docs to no avail. Am I missing something somewhere?
1 Reply
Matvey
Matvey5mo ago
Next loads .env.development and .env.production automatically, you don't need to configure everything https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#environment-variable-load-order
Configuring: Environment Variables | Next.js
Learn to add and access environment variables in your Next.js application.
Want results from more Discord servers?
Add your server