Hi Jese, thank you for writing this package! I am teaching a coding bootcamp, and I am having my students use this to manage their env vars locally and on heroku. We are also using react-router-dom for routing and navigation. (I am not an experienced react or webpack developer, so please tell me if I am doing anything silly!)
I've noticed that when navigating to a route other than root, the <script id="react-dotenv" src="./env.js"></script> tag makes a request to the relative route hostname/yourCurrentRoute/env.js

And the server fulfills this request with index.html, which of course blows up

I've been working around it by adding "homepage": "" to my package.json, so that the #react-dotenv tag in my index.html gets a src of "/env.js" instead of "./env.js". This seem to fix the issue, as the request uses an absolute route and always goes to hostname/env.js, no matter the route of my react app. Should "" be the default for homepage instead of "."?
Hi Jese, thank you for writing this package! I am teaching a coding bootcamp, and I am having my students use this to manage their env vars locally and on heroku. We are also using react-router-dom for routing and navigation. (I am not an experienced react or webpack developer, so please tell me if I am doing anything silly!)
I've noticed that when navigating to a route other than root, the

<script id="react-dotenv" src="./env.js"></script>tag makes a request to the relative routehostname/yourCurrentRoute/env.jsAnd the server fulfills this request with index.html, which of course blows up

I've been working around it by adding
"homepage": ""to my package.json, so that the#react-dotenvtag in my index.html gets a src of"/env.js"instead of"./env.js". This seem to fix the issue, as the request uses an absolute route and always goes to hostname/env.js, no matter the route of my react app. Should""be the default for homepage instead of"."?