title: How to proxy URL call in Vue.js in production?
body: <p>In Dev, I have my local vue.js project and a dev server.  And I followed this guide: </p>
  
  <p><a href="http://vuejs-templates.github.io/webpack/proxy.html" rel="nofollow noreferrer">http://vuejs-templates.github.io/webpack/proxy.html</a></p>
  
  <p>to set up the <code>proxyTable</code> so that whenever I make a <em>REST</em> call to dev server using <code>Axios</code>, it will redirect to my dev server instead of the vue url.</p>
  
  <p>When I deploy to prod, my vue build packages are deployed to S3 and my rest server is in <em>EBS</em>.  They are in different subdomains.  So my Vue needs to also set up a proxy for all <em>REST</em> calls.  However,  <code>vuejs&amp;webpack</code> doesn't allow a proxyTable in the config file under <code>build</code> section.  What's the best way to handle this? </p>
  
  <p>my config: </p>
  
  <pre><code>module.exports = {
    build: {
      env: 'prod',
      productionSourceMap: true,
      assetsSubDirectory: 'static',
      assetsPublicPath: '/',
      proxyTable: {
        '/api': {
         logLevel: 'info',
         target: 'http://myRestServer.com/...',
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/'
         }
        }
      }, 
    },
   dev: {
     proxyTable: {
       '/api': {
        logLevel: 'info',
        target: 'http://127.0.0.1:3005',
         changeOrigin: true,
        pathRewrite: {
           '^/api': '/'
        }
      }
    },
  }
  </code></pre>