I would like to set NODE_ENV to stage so that my code can select a different api endpoint. I would like to test this with a production build. I thought I could do this in the package.json file:
"build:stg": "cross-env NODE_ENV=stage webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
webpack would do a production build with the NODE_ENV set to stage. In my webpack.base.babel.js I have this
so when my webpack production configurations uses the base, I thought it would set process.env.NODE_ENV to stage. However, when I console.log(process.env.NODE_ENV) it in my app, I get production. Is this being set anywhere else in the webpack config files? I can't seem to find it.