My Angular application operates in three different environments: Development, Staging, and Production. When Heroku builds the application based on my build script, a Gruntfile includes a release task that uglifies the code.
Heroku executes the command Grunt release for both staging and production environments.
However, I require logs to be activated in the staging environment and deactivated in the production environment.
In an attempt to achieve this, I tried to access process.env.NODE_ENV in my Grunt file, but it returned as undefined.
Although I have set process.env.NODE_ENV to production in webstorm to start the server, I am unable to access this in the Grunt file.
Please provide guidance on how to proceed.