title: Can't set values on `process.env` in client-side Javascript
body: <p>I have a system (it happens to be Gatsby, but I don't believe that's relevant to this question) which is using webpack DefinePlugin to attach some EnvironmentVariables to the global variable: <code>process.env</code></p>
  
  <p>I can read this just fine.</p>
  
  <p>Unfortunatley, due to weirdnesses in the app startup proces, I <del>need</del> have chosen to do some brief overwritting of those EnvironmentVariables after the site loads. (Not interested in discussing whether that's the best option, in the context of this question. I know there are other options; I want to know whether <em>this</em> is possible)</p>
  
  <p>But it doesn't work :(
  <hr>
  If I try to do it explicitly:</p>
  
  <pre><code>process.env.myVar = 'foo';
  </code></pre>
  
  <p>Then I get <code>ReferenceError: invalid assignment left-hand side</code>.</p>
  
  <hr>
  
  <p>If I do it by indexer (which appears to be what <code>dotenv</code> does) then it doesn't error, but also doesn't work:</p>
  
  <pre><code>console.log(process.env.myVar);
  process.env['myVar'] = 'foo';
  console.log(process.env.myVar);
  </code></pre>
  
  <p>will log <code>undefined</code> twice.
  <hr>
  What am I doing wrong, and how do I fix this?</p>