<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">using:</p>
<ul dir="auto">
<li><code class="notranslate">zeit/next-sass</code> for my <code class="notranslate">next.config.js</code></li>
<li>a custom <code class="notranslate">server.js</code> with a custom directory
<ul dir="auto">
<li><code class="notranslate">const application = next({ dev, dir: './src' });</code></li>
</ul>
</li>
<li>Flow js for type checking</li>
<li>Redux and Apollo</li>
</ul>
<p dir="auto">I have just updated to next 6.0.0 and I can't use my site because the HMR fails to find any information, causing any route requests to result in a full reload.</p>
<p dir="auto">The site works when loaded with <code class="notranslate">yarn build &amp;&amp; yarn start</code></p>
<p dir="auto">Folder structures:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./src
  /pages
    /apps
      /Public
        index.js
        sign_in.js
        sign_up.js
        forgot_password.js
      /Admin
        ......."><pre class="notranslate"><code class="notranslate">./src
  /pages
    /apps
      /Public
        index.js
        sign_in.js
        sign_up.js
        forgot_password.js
      /Admin
        .......
</code></pre></div>
<h1 dir="auto">EDIT:</h1>
<p dir="auto">It seems like the files are supposed to go directly into <code class="notranslate">.next</code>  I see that happening in a small test repo that I made.  However, it now seems that if that's the case, the error I'm encountering is actually the fact that the HMR is unable to find the <code class="notranslate">hot-update.json</code> files when updates are made.</p>
<h1 dir="auto">END EDIT</h1>
<hr>
<p dir="auto">When on page <code class="notranslate">/apps/Public/sign_in</code> as <code class="notranslate">/sign_in</code> I click on <code class="notranslate">&lt;Link to="/apps/Public/forgot_password" as="forgot_password" /&gt;</code></p>
<p dir="auto">Result:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6400039/39766023-3eaaed5e-52b1-11e8-9839-61259225381d.png"><img src="https://user-images.githubusercontent.com/6400039/39766023-3eaaed5e-52b1-11e8-9839-61259225381d.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Initial page loads of all pages works perfectly.  However, any route changes fail.</p>
<h2 dir="auto">Debugging</h2>
<p dir="auto">I have tried just about everything I can think of.  It seems like this error is caused from my <code class="notranslate">./src/.next</code> file not having a <code class="notranslate">/webpack</code> directory.  My understanding is that HMR will look for the <code class="notranslate">hot-update.json</code> files in <code class="notranslate">/webpack</code></p>
<p dir="auto">However, in my case, all <code class="notranslate">hot-update.json</code> files are in <code class="notranslate">./src/.next</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6400039/39766255-d8ef7358-52b1-11e8-9a1c-083fc6a8c503.png"><img src="https://user-images.githubusercontent.com/6400039/39766255-d8ef7358-52b1-11e8-9a1c-083fc6a8c503.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Contents of <code class="notranslate">./src/.next</code></h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6400039/39766326-01e4a1a2-52b2-11e8-8caa-7d1b950be4a1.png"><img src="https://user-images.githubusercontent.com/6400039/39766326-01e4a1a2-52b2-11e8-8caa-7d1b950be4a1.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Questions:</h2>
<ul dir="auto">
<li>Why do I not have a <code class="notranslate">/webpack</code> directory?</li>
<li>I can't create a reproduction repo, can someone from Zeit help by looking through my private repo?</li>
</ul>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>6.0</td>
</tr>
<tr>
<td>node</td>
<td>9.11.1</td>
</tr>
<tr>
<td>OS</td>
<td>Mac OS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table>
<p dir="auto">next.js need more webpack configuration</p>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">webpack config can use hashcode to generate file name, add the hascode can be used in pages</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">i genereate my css file use extractCssPlugin, and named it by hashcode. but i couldn't get the webpack content hashcode in my pages, cod i couldn't use this css file.</p>
<p dir="auto">and i wanna know, how can i cache my css file and js file, without hashcode, should i write the version code by hands? it is ridiculous. why you guys don't provide the static resouce cache examples? it's hard for newer to found out how to cache static resouse in next.js.</p>
<p dir="auto">i think we aslo need a example about cache js file and css file!!!</p>
<h2 dir="auto">Context</h2>


<p dir="auto">i just wanna know how to cache static resource like main.js and css generate by withcss plugin,<br>
where to get the unique version code and how to quote them in my _doucment.js file</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>6.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.7</td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>