title: How to use webpack proxy devserver pathRewrite?
body: <p>I'm currently struggling with rewriting the proxy path to the api server. 
  In my setup what I do is for api request, I delegate it to the proxy server and only for js/html/css <code>webpack-dev-server</code> is used. </p>
  
  <p>Following is what I'm using: </p>
  
  <pre><code>devServer: {
      inline: true,
      port: 8080,
      historyApiFallback: true,
      publicPath: 'http://localhost:8080/dist/',
      disableHostCheck: true,
      proxy: {
          '/api': {
          target: 'http://localhost:3000',
          pathRewrite: {'???' : ''} //Need to append http://localhost:3000/MySite1/api
    }
  }
  </code></pre>
  
  <p>So, How do I append /MySite1 to api request before it proxies to the localhost:3000?</p>
  
  <p>E.g. 
  If the request is : 
  <a href="http://localhost:8080/api" rel="nofollow noreferrer">http://localhost:8080/api</a>, it should re write to <a href="http://localhost:3000/MySite1/api" rel="nofollow noreferrer">http://localhost:3000/MySite1/api</a></p>
  
  <p>Also, 
  If the request is : 
  <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a>, 
  it should re write to <a href="http://localhost:3000/MySite1" rel="nofollow noreferrer">http://localhost:3000/MySite1</a> </p>