I have an angular application which runs in 3 different environment- Development, Staging and Production. Heroku builds the application based on my build script. I have a Gruntfile which as release task which uglifies the code.
Heroku runs this command Grunt release for both staging and production environment.
But I need logs to be enabled in staging and disabled in production environment.
For doing this, I tried accessing process.env.NODE_ENV in my grunt file. But it says process.env.NODE_ENV is undefined.
I am using webstorm to start the server in which I have defined process.env.NODE_ENV to production. But I am unable to access this in Grunt file.
Kindly let me know how to proceed.