Proxy in package.json not affecting fetch request : <p>I am trying to fetch some data from the development server using React.</p>

<p>I am running the client on <code>localhost:3001</code> and the backend on <code>port 3000</code>.</p>

<p><strong>The fetch request :</strong> </p>

<pre><code> const laina = fetch('/api/users');
    laina.then((err,res) =&gt; {
      console.log(res);
    })
</code></pre>

<p>When I run my development server and webpack-dev-server I get the following output:</p>

<pre><code>GET http://localhost:3001/api/users 404 (Not Found)
</code></pre>

<p>I tried specifying the proxy in the <em>package.json</em> so it would proxy the request to the API server, however nothing has changed.</p>

<p>Here is my <strong>package.json file</strong>: </p>

<p><a href="https://i.stack.imgur.com/1RZta.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1RZta.png" alt="enter image description here"></a></p>

<p>.. and the <strong>webpack.config</strong> :
<a href="https://i.stack.imgur.com/54g3u.png" rel="noreferrer"><img src="https://i.stack.imgur.com/54g3u.png" alt="enter image description here"></a></p>

<p>Please tell me, if you need to see anything else from my project. I apologies, if I'm missing something and not being thorough, I'm still quite new to using these technologies. </p>
