title: Setup React application inside AWS Beanstalk using environment variables
body: <p>I was looking if this is possible to set React application to have specific environment variables based on Beanstalk environment the application is being deployed to.</p>
  <p>My goal is to have precompiled react code that has environment variables that are specific for that env only. I want to avoid serving JS code that has all environment variables to the user</p>
  <p>Say I have 2 different environments in Beanstalk:</p>
  <p>env A: should have <code>process.env.API_ROUTE = http://api1/</code></p>
  <p>env B: should have <code>process.env.API_ROUTE = http://api2/</code></p>
  <p>Is it possible to use MsBuild conditions so that it runs different build scripts depending on the Beanstalk environment selected?
  Or maybe it is possible to condition based on the Beanstalk internal environment variable?</p>