React router hot-reload not working
<p>I have a small problem there are few similar questions on SA already but I can't figure out how to fix this. I am using <code>react-router-redux</code> but for this example I don't think there are any differences to using <code>react-router</code></p>

<p>I have a simple setup:</p>

<pre><code>&lt;Router history={browserHistory}&gt;
  &lt;Route path="/"&gt;
    &lt;IndexRoute component={ItemList}/&gt; 
    &lt;Route path='item/:uuid' component={Item}/&gt; 
  &lt;Route&gt;
&lt;Router&gt;
</code></pre>

<p>I am using:</p>

<ul>
<li>webpack</li>
<li>webpack-dev-server</li>
<li>html-webpack-plugin</li>
</ul>

<p>When i visit localhost:8080 the IndexRoute is rendered. I can then press one of the items which has <code>onClick={() =&gt; this.props.dispatch(routeActions.push('/item/' + item.uuid))}</code> set. The history at this stage works fine I can go back and select another item and so on. But...</p>

<p>When I am on a item page for example localhost:8080/item/1234 and when I hit refresh I get:</p>

<p><code>404 not found - localhost:8080/item/bundle.js</code></p>

<p>This as well happens when I make some changes to the item page and hot reloading is rerendering it.</p>

<p>After going through few questions I can confirm that I have <code>historyApiFallback: true</code> and when I start the server it is reporting that <code>404s will fallback to /index.html</code></p>

<p><strong>Update:</strong></p>

<p>So when I hit refresh after being on <code>localhost:8080/item/1234</code> chrome inspect say that was 200 response from server which looks like:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Damage Increased&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt; 
    &lt;script src="bundle.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And then it is 404 on <code>http://localhost:8080/item/bundle.js</code></p>

<p>It looks like all the dev server stuff is working fine and the server indeed returns the index file but then the <code>&lt;script src="bundle.js"&gt;&lt;/script&gt;</code> is looking for a <code>bundle.js</code> file inside of the <code>/item</code> sub.</p>