I found a workaround, from the different ENV vars the only one with a value during the build is DEP_NAME
, but it's enough since we can extract the env
from it: project/environment
. This works in CloudControl, no idea if it would work in Heroku.
if ('DEP_NAME' in process.env) {
process.env.NODE_ENV = process.env.DEP_NAME.split('/')[1];
}