How can I use config vars from heroku on my frontend? In dev mode I've used my .env file and dotenv-webpack but this doesn't work in production. So I've tried to use a custom plugin lilke this:
new webpack.DefinePlugin({
'process.env': {
' api1': JSON.stringify(process.env.api1),
'api2': JSON.stringify(process.env.api2),
}
})
Still, this doesn't work. Any ideas how can I use config vars from heroku on my react frontend, what do i need?