0👍
The problem is that if you include a variable in the Webpack bundle, it won’t store the reference of the variable but the value of the variable. I solved the problem by discluding the environmental variables from the bundle and including them as a plain JS/JSON file at the top of my index.html. So if you edit the JSON or the JS on the server, it should work.
Source:stackexchange.com