I'm trying to add environment variables to the nuxt.config.js file in the env property to access the variables in server/index.js file but it gives undefined. According to the env documentation, the variables should work in both client and sever. Not sure if i'm missing something? Thanks in advance.
module.exports = {
env: {
baseUrl: process.env.BASE_URL || 'http://localhost:3000'
}
}