title: How to load environment variables from .env file using Vite
body: <p>I want to load environment variables from the <strong>.env</strong> file using <a href="https://vitejs.dev/" rel="noreferrer">Vite</a></p>
  <p>I used the <code>import.meta.env</code> object as mentioned in <a href="https://vitejs.dev/guide/env-and-mode.html#env-variables" rel="noreferrer">Docs</a></p>
  <p><code>.env</code> file:</p>
  <pre><code>TEST_VAR=123F
  </code></pre>
  <p>when trying to access this variable via the <code>import.meta.env</code> -&gt; <code>import.meta.env.TEST_VAR</code> it returns undefined.</p>
  <p>so, how can I access them?</p>