title: Unable to access process variable in Vue3JS Vite project
body: <p>I am creating a vue3 application (created with Vite) that interacts with a smart contract written in Solidity and stored on Ropsten. Therefore I am using web3js to interact with my smart contracts and also web3.storage in order to store some images on IPFS. I have a <code>.env</code> file at the root of my project storing my API key for web3.storage :</p>
  <pre><code>VUE_APP_API_TOKEN=VALUE
  VITE_API_TOKEN=VALUE
  </code></pre>
  <p>The problem is that apparently web3.storage expects the API token to be stored in process.env and I am unable to access the global <code>process</code> variable from my application. I am always getting an error <code>Uncaught ReferenceError: process is not defined</code>.</p>
  <p>I think, this is linked to my usage of Vite instead of pure Vue3.
  I tried to export process env in the <code>vite.config.ts</code> file with that code but it didn't work:</p>
  <pre><code>export default ({ mode }) =&gt; {
     process.env = { ...process.env, ...loadEnv(mode, process.cwd(), '') };
  
     console.log(process.env.VITE_API_TOKEN)         //Works fine: VALUE is logged
     console.log(process.env.VUE_APP_API_TOKEN)      //Works fine: VALUE is logged
  
     return defineConfig({
         plugins: [vue()]
     });
  }
  </code></pre>
  <p>How could I access the <code>process</code> variable from my vue files in order to get the values of my environment variable and make web3.storage work?</p>