title: Environment Variables don't work in a nested JS file (React)
body: <p>I'm trying to use environment variables in create-react-app.</p>
  
  <p>I've prefixed all of the variables in my .env file with REACT_APP_ and installed/required dotenv. </p>
  
  <p>However, I'm suspecting that the reason why my .env values aren't being read is because the script in which I'm calling them from isn't in the root folder where my .env file is located. </p>
  
  <p>There's a quick overview of my project structure below</p>
  
  <p><code>ROOT:
      .env
      VIEWS (folder):
          view.js</code></p>
  
  <p>I'm trying to access the .env variables in view.js by calling <code>process.env.REACT_APP_MYVAR</code> but it either doesn't return a value or returns something that isn't a string (which is the error my API is throwing, but it could be because that call is returning <code>undefined</code>)</p>
  
  <p>Is this a known issue or is there any way I can fix this? I could just take the script out of that folder and put it in the root of my app but I'd rather keep the structuring of the app consistent</p>