Let's say I am deploying Next.js in different env, for example.
- local development
- staging deployment
- production deployment
Previously I hand used .env
file with one of the framework where I could easily name the file like .env.local
, .env.stage
& .env.prod
and when I run node app locally it would load .env.local, with
export STAGE=stageframework would use
.env.stage`, like wise fro productoin.
Is that such support in Next js where I can have different .env
file for different stage. If it is supported then how would I specify which stage Next.js is running.