<p dir="auto">With introduction of <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-plugins">next-plugins</a> we've got more functionality and dependencies exposed in <code class="notranslate">next.config.js</code>, using plugins like <code class="notranslate">next-sass</code> and others adds extra development dependencies to the runtime, even in production mode, since <code class="notranslate">next.config.js</code> is execute at server start time.<br>
Requiring us to carry along node modules that we'd never use with production baked artifacts.</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">As we discussed last week, possible solution would be to allow next.js to read lifecycle specific configs, like <code class="notranslate">next.config.dev.js</code> and <code class="notranslate">next.config.build.js</code> with fallback to <code class="notranslate">next.config.js</code>.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Loads <code class="notranslate">next.config.js</code> irrespectively of the lifecycle stage.</p>
<p dir="auto">Thank you.</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 using a custom server, routing to a page should automatically bundle the styles of all included components.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">That is not the case.  You will need to hard refresh the page to get the styles to be built.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Clone <a href="https://github.com/Kyle-Mendes/next-sass-modules/tree/custom-server">https://github.com/Kyle-Mendes/next-sass-modules/tree/custom-server</a> (make sure you're on the <code class="notranslate">custom-server</code> branch</li>
<li>Run <code class="notranslate">yarn dev</code></li>
<li>visit <code class="notranslate">localhost:3000</code></li>
<li>Click "Test Page"</li>
<li><strong>Observe</strong>:  The <code class="notranslate">Headline</code> component is not styled.</li>
<li>Refresh the page</li>
<li><strong>Observe</strong>: The <code class="notranslate">Headline</code> component is styled.</li>
</ol>
<h3 dir="auto">NOTE:</h3>
<p dir="auto">Sometimes, even doing a hard reload results in <code class="notranslate">Headline</code> not being styled.</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</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>