I have a react/node app that I\'m deploying. One of the components attempts to access NODE_ENV in order to determine which host URL to use (localhost or heroku).
I now r
You could check NODE_ENV in index.html by using:
if ("%NODE_ENV%" === "production") {
// ...do production stuff
} else {
// ...do development stuff
}
When index.html is compiled in a production environment it will look something like this
if ("production" === "production") {
// ...do production stuff
} else {
// ...do development stuff
}