title: how to make the page not redirect when using webpack's devServer.proxy?
body: <p>here's a project <strong>whose router is in the backend</strong>, image we can open the url <code>www.example.com/a.htm</code>. Then I want to use webpack to modularize the js, as you know, all the requests should be redirected to the <code>www. example.com</code> instead of <code>localhost</code>.</p>
  
  <p>Then I find the <code>devServer.proxy</code>:</p>
  
  <pre><code>devServer: {
    proxy: {
      "/": {
        target: "http://www.example.com",
        changeOrigin: true
      }
    }
  }
  </code></pre>
  
  <p>but when I open <code>localhost:8080</code>, it will be redirected to <code>www.example.com</code>, and then it cannot find the bundle.js file. </p>
  
  <p>So here's my question, how to make <code>localhost:8080</code> not redirected? or it's wrong to use it this way?</p>