Loading chunk failed on Local IIS
<p>Context: Asp.Net Core, published on Local IIS, webpack.</p>

<p>So i've hosted one of my sites at <a href="http://localhost/wanvet" rel="nofollow noreferrer">http://localhost/wanvet</a>. (Local IIS)</p>

<p>For main page (dashboard) everything works as expected. </p>

<p>When i try to get to another component i get a request to <a href="http://localhost/dist/0.hash.chunk.js" rel="nofollow noreferrer">http://localhost/dist/0.hash.chunk.js</a> instead of <a href="http://localhost/wanvet/dist/0.hash.chunk.js" rel="nofollow noreferrer">http://localhost/wanvet/dist/0.hash.chunk.js</a> where wanvet is my local iis alias (folder).</p>

<p>Here is the script appending call: </p>

<p>BaseURI being:
<a href="https://i.stack.imgur.com/F0uSe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F0uSe.png" alt="Script appending baseURI"></a></p>

<p>src being the following: 
<a href="https://i.stack.imgur.com/qwz1S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qwz1S.png" alt="Src for current chunk script"></a></p>

<p>And here is the console exception: 
<a href="https://i.stack.imgur.com/RiE1g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RiE1g.png" alt="Console exception for chunk loading failed"></a></p>

<p>I suppose that one way to resolve this is to host the site at <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a> but i'm really not into it.</p>

<p>Successful request for js, css from root: </p>

<p><a href="https://i.stack.imgur.com/TvCNy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TvCNy.png" alt="Request from root"></a></p>

<p><strong>Later edit: Added one answer modifying the output publicPath. I still look forward for other opinions.</strong> </p>