<p dir="auto">When outputting <code class="notranslate">debugger</code> keywords in my code and connecting my IDE to the node debugger it is breaking in the compiled code, not the uncompiled code. Sourcemaps are stripped from custom codes/pages/etc.</p>
<p dir="auto">The commons.js and main.js files follow the sourcemaps settings (<code class="notranslate">devtool: cheap-module-eval-source-map</code> in webpack settings by default)</p>
<p dir="auto">Could this be related with the custom babel setting that are used for node?<br>
-&gt; <a href="https://github.com/zeit/next.js/blob/v3-beta/server/build/webpack.js#L205">https://github.com/zeit/next.js/blob/v3-beta/server/build/webpack.js#L205</a> <g-emoji class="g-emoji" alias="thinking" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f914.png">🤔</g-emoji></p>

<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">The compiled custom code in the .next/dist folder should have sourcemaps generated according to settings in webpack/babel.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">No sourcemaps are generated for custom code accessible for server side debugging. The sourcemaps are however accessible on client side.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Create a next.js project with a index.js page and sourcemaps enabled (at time of writing the default setting)</li>
<li>Run <code class="notranslate">next</code>to start dev server</li>
<li>Open <code class="notranslate">.next/dist/pages/index.js</code> and scroll down to the bottom of the file. It will have no <code class="notranslate">//# sourceMappingURL</code> comment</li>
<li>Open <code class="notranslate">.next/dist/main.js</code> and scroll down to the bottom of the file. It will have a <code class="notranslate">//# sourceMappingURL</code> comment!</li>
</ol>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">viewport tag gets duplicated in the browser (there's no custom viewport tag provided).</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">This occurs on our site, but I've noticed that nextns.org has the same issue, so the instructions are for it:</p>
<ol dir="auto">
<li>Go to <a href="https://nextjs.org" rel="nofollow">https://nextjs.org</a></li>
<li>Wait for the page to load</li>
<li>Inspect the element tree</li>
<li>Search for <code class="notranslate">"viewport"</code>, you'll see two occurrences</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">There should only be one.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/242202/64430115-773f4480-d0af-11e9-99fd-0b8be4ad6d73.png"><img src="https://user-images.githubusercontent.com/242202/64430115-773f4480-d0af-11e9-99fd-0b8be4ad6d73.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Browser (if applies): Chrome</li>
<li>Version of Next.js: 9.0.5</li>
</ul>