<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">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto"><code class="notranslate">&lt;meta charset="utf-8"&gt;</code> should be the first element in the <code class="notranslate">&lt;head&gt;</code></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><code class="notranslate">&lt;NextScript /&gt;</code> prepends the preloadDynamicChunks in the head.<br>
<a href="https://github.com/zeit/next.js/blob/canary/server/document.js#L87">https://github.com/zeit/next.js/blob/canary/server/document.js#L87</a></p>
<h2 dir="auto">Context</h2>
<p dir="auto"><a href="https://sonarwhal.com/docs/user-guide/rules/meta-charset-utf-8/" rel="nofollow">https://sonarwhal.com/docs/user-guide/rules/meta-charset-utf-8/</a></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>4.1.3</td>
</tr>
<tr>
<td>node</td>
<td>8.4.0</td>
</tr>
</tbody>
</table>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When using <code class="notranslate">experimental.publicDirectory</code> and dynamic routing with the following setup</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/pages
  [slug].js
/public
  robots.txt"><pre class="notranslate"><code class="notranslate">/pages
  [slug].js
/public
  robots.txt
</code></pre></div>
<p dir="auto">If you hit <code class="notranslate">/robots.txt</code>:</p>
<ul dir="auto">
<li>On dev server it resolves to the [slug].js page</li>
<li>On build server it resolves to the robots.txt file</li>
</ul>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Described above</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I would expect dev-server to also resolve that route to the robots.txt file.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Version of Next.js: 9.0.2</li>
</ul>