Here is the code:
if (process.env.NODE_ENV === 'production') { module.exports = require('./keys_prod');} else { module.exports = require('./keys_dev');}
keys_prod IS on the server
keys_dev is only on my local machine
Here is the problem:
when the app starts up on Heroku I get the following:
ERROR in ./src/environment/keys.js 8:2-40 Module not found: Error: Can't resolve './keys_dev' in '/app/src/environment'
Heroku Config vars
I have the following set in the Heroku config vars:
package.json
my package.json scripts section
"scripts": {"start": "react-scripts start","build": "react-scripts build","test": "react-scripts test","eject": "react-scripts eject","heroku-postbuild": "npm run build" },
saw this but I am on heroku 22 - so that won't work