I'm using next.js 12 with a react app.
I have the following .env.local file:
NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE="public_development_variable"
I start the dev server and in the browser i do:
console.log('###ENV', process.env)
and i always get undefined.
In the logs i have this that confirms that the env file was readed:
info - Loaded env from /Users/testdash/.env.local
But process.env is always empty
console.log(process.env.NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE).