<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I have two page components PageA and PageB. PageA doesn't use antd components but PageB does. The style file of PageB imported antd's css file:<br>
style-b.less</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@import '~antd/dist/antd.css';
// ...other styles"><pre class="notranslate"><code class="notranslate">@import '~antd/dist/antd.css';
// ...other styles
</code></pre></div>
<p dir="auto">PageB:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import './style-b.less'
// ..."><pre class="notranslate"><code class="notranslate">import './style-b.less'
// ...
</code></pre></div>
<p dir="auto">When I first open PageB, everything runs well;<br>
When I first open PageA and jump to PageB (by click a link in PageA), the antd css file is not loaded.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>Open localhost:3000/b (pageB rendered correctly)</li>
<li>Open localhost:3000/a, click the link to jump to b (this time pageB doesn't load antd's style)</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">When jump to b from a, b have the antd style file loaded.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: mac</li>
<li>Browser (if applies) chrome 73.0.3683.86</li>
<li>Version of Next.js: 8.0.3</li>
</ul>
<p dir="auto">In <a href="https://github.com/hanford/nextjs-cssmodules">this small repo</a> I've illustrated <code class="notranslate">next-css</code> not working with SSR, this is a blocker from my team moving off of <a href="https://github.com/traveloka/styled-modules">https://github.com/traveloka/styled-modules</a> which we're super eager to do.</p>
<p dir="auto">Great work on Next.js 5.0! Can't wait to fully migrate to it :)</p>
<p dir="auto">I would mind if Next.js apps had to have a custom <code class="notranslate">_document.js</code> to support this, but I guess thats more of an implementation detail.</p>