<p dir="auto">Hi,</p>
<p dir="auto">If I use a custom distDir:</p>
<ul dir="auto">
<li>the following error appears in the console: <code class="notranslate">http://myUrl/_next/-/page/_error</code> / 404 not found</li>
<li>hot reloading does not work properly anymore</li>
</ul>
<p dir="auto">If I go back to the default, it goes away.</p>
<p dir="auto">my <code class="notranslate">next.config.js</code> file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// see source file server/config.js
module.exports = {
  webpack: null,
  poweredByHeader: false,
  distDir: '.build',
  assetPrefix: ''
}"><pre class="notranslate"><code class="notranslate">// see source file server/config.js
module.exports = {
  webpack: null,
  poweredByHeader: false,
  distDir: '.build',
  assetPrefix: ''
}
</code></pre></div>
<p dir="auto">Thanks,<br>
Paul</p>
<p dir="auto">I cannot get the custom distDir to work. Whenever I add a next.config.js file and set the distDir as described in the documentation</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
  distDir: 'build'
};"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">distDir</span>: <span class="pl-s">'build'</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">the build is created in that directory, but there is always an exception being thrown in the browser when loading the page.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error when loading route: /_error
Error: Error when loading route: /_error
    at HTMLScriptElement.script.onerror"><pre class="notranslate"><code class="notranslate">Error when loading route: /_error
Error: Error when loading route: /_error
    at HTMLScriptElement.script.onerror
</code></pre></div>
<p dir="auto">What am I missing? This is reproducible with the simple hello world example.</p>