This envs just works in Server Side. To access this envs in Client Side,
you need declare in the next.config.js
This way:
module.exports = {
reactStrictMode: true,
env: {
BASE_URL: process.env.BASE_URL,
}
}
On Next +9, prefix the variables using
NEXT_PUBLIC_. This will expose them on the browser