<p dir="auto">We're working on upgrading Next.js from 2.1.1 to 2.3.1 after reading about all the speed optimizations.  We're receiving the following warning about the three preloaded scripts that are now included in the head of the page:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2166663/26266953/5c46f10c-3cad-11e7-8c9c-b05a15284209.png"><img src="https://cloud.githubusercontent.com/assets/2166663/26266953/5c46f10c-3cad-11e7-8c9c-b05a15284209.png" alt="screen shot 2017-05-19 at 4 07 10 pm" style="max-width: 100%;"></a></p>
<p dir="auto">Did we misconfigure something that's causing these scripts to wait on something else to load?</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?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">When building my app using <code class="notranslate">NODE_ENV=production next build</code>, it should only count the actual pages.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">When building my app using <code class="notranslate">NODE_ENV=production next build</code>, it is grabbing any file that is <code class="notranslate">.js</code> under <code class="notranslate">/pages</code> folder.</p>
<p dir="auto">This includes:</p>
<ul dir="auto">
<li>test files (in my case, *.test.js)</li>
<li>page specific components, containers, and views</li>
</ul>


<h2 dir="auto">Context</h2>


<p dir="auto">This results in, the pre-defined <code class="notranslate">webpack.js</code>, having "104 total pages" of which, I really have 12-ish pages. So when it goes to try to bundle "common" modules (ie. lodash, momentjs) they end up not getting bundled because the defined plugin looks for count to be greater than or equal to 1/2 the pages. Lodash usage count is 9-54x and Moment.js usage count is ~24x. These should easily get bundled based on usage and actual pages.</p>
<p dir="auto">Another option would be to allow a way to define our own bundling methods. Currently, I couldn't figure out a way to accomplish that.</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>v6</td>
</tr>
<tr>
<td>node</td>
<td>v9.11.1</td>
</tr>
<tr>
<td>OS</td>
<td>Win 10</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 66</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>