title: Different variable value in Vue.js + Webpack in dev server vs build
body: <p>I'm working on a Vue.js project which is running Webpack in local development &amp; builds static files for deployment.</p>
  
  <p>There is a variable <code>apiDomain</code> which needs to change from:</p>
  
  <p><code>http://localhost.api/</code> - in local development</p>
  
  <p>to</p>
  
  <p><code>https://api.example.com/</code> - in the static build files</p>
  
  <p>I've been trying to get my head around environmental variables but I'm not sure how they work in Webpack vs Vue.js.</p>
  
  <p>What is the correct way to setup a Vue.js variable so it's different between local development &amp; the static build files?</p>