title: Webpack 4 Proxy (How to set up proxy url in webpack 4)
body: <p>I am basically a webpack newbie and here's the issue I have come accross. I was following a tutorial on how to set up a proxy url in webpack and used this syntax:</p>
  
  <pre><code>proxy: {
    '/api/*': {
      target: 'http://localhost:5000',
      secure: false
    }
  },
  </code></pre>
  
  <p>But this gives me <a href="https://i.stack.imgur.com/mTXEM.png" rel="nofollow noreferrer">this error</a>!</p>
  
  <p>The tutorial i was following was before webpack 4 came out so I think webpack 4 has some other way of doing it.</p>
  
  <p>Heres what i want to achieve:
  * I have a webpackdev server on port 8080 and my express backend is listening on port 5000 i want fetch requests like api/ to go to 5000/api instead of 8080/api.</p>
  
  <p>I hope you guys can help </p>