title: Multi Tenant App in React
body: <p>I'm building a multi tenant app in React (with Webpack setup via base, dev and prod config files), and I'm wondering the best way to create and access per-tenant variables.</p>
  
  <p>When I run my app with:</p>
  
  <p><code>npm run start tenant1</code></p>
  
  <p>I am able to access <code>tenant1</code> in Webpack by using this:</p>
  
  <p><code>const tenant1 = process.argv[process.argv.length -1];</code></p>
  
  <p>However, now I'm wondering what is the best way to make that variable globally accessible. My hope is to use that variable to the create a folder structure within the app along the lines of:</p>
  
  <p><code>/app/${tenant}/img/
  /app/${tenant}/css/
  /app/${tenant}/components/
  </code></p>
  
  <p>Ideally without having to import a variable into every single javascript file.</p>
  
  <p>Any suggestions or links to existing setups would be greatly appreciated. </p>