<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto"><code class="notranslate">Router.push ('/')</code> doesn't work when I import a <code class="notranslate">.styl</code> file into<code class="notranslate"> index.js</code>.</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>Go to <code class="notranslate">https://next-router-push-cztzjhofde.now.sh/</code></li>
<li>Click on <code class="notranslate">About Button</code> &gt; It works</li>
<li>Click on <code class="notranslate">Home Button</code> &gt; It works</li>
<li>Click on <code class="notranslate">About Button</code> again &gt; It works</li>
<li>Refresh the page</li>
<li>Click on <code class="notranslate">Home Button</code> &gt; Doesn't work</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">When I refresh the page and click on <code class="notranslate">Home Button</code> it should be redirected to Home Page.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">Not applicable.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows 10</li>
<li>Browser: chrome, firefox, edge</li>
<li>Version of Next.js: 7.0.1</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">This problem only occurs when I import the <code class="notranslate">styl</code> file. If I remove it, the problem disappears. If I import the <code class="notranslate">.styl</code> file into the Header, the problem doesn't happen.</p>
<p dir="auto">Source code available here: <a href="https://github.com/robertoachar/next-router-push">https://github.com/robertoachar/next-router-push</a>.</p>
<p dir="auto">Bug: <a href="https://github.com/robertoachar/next-router-push/commit/647443fca6de7abba39134e60b48bc1c82456b27">https://github.com/robertoachar/next-router-push/commit/647443fca6de7abba39134e60b48bc1c82456b27</a>.</p>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When using <code class="notranslate">@zeit/next-sass</code> and CSS Modules, a <code class="notranslate">Router.push</code> (or click on <code class="notranslate">&lt;Link&gt;</code>) has no effect when linking from a page that doesn't have a CSS import to another page that has.</p>
<h2 dir="auto">To Reproduce</h2>
<ol dir="auto">
<li>Clone <a href="https://github.com/claus/next-test-css-modules">https://github.com/claus/next-test-css-modules</a></li>
<li><code class="notranslate">npm run dev</code></li>
<li>Click on the "Test" link.</li>
<li>Nothing happens.</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">App should navigate from the index page to <code class="notranslate">/test</code>.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Version of Next.js: 9.0.2</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">What appears to happen is that the <code class="notranslate">test.js</code> script loads, but the loaded component<br>
is never registered. In PageLoader <code class="notranslate">loadPage()</code>, the page register event is never fired,<br>
and as a result the Promise never fulfills/rejects.</p>
<p dir="auto">To "fix" the app:</p>
<ul dir="auto">
<li>Either uncomment <code class="notranslate">import styles from './index.scss'</code> in <code class="notranslate">index.js</code></li>
<li>Or comment out <code class="notranslate">import styles from './test.scss'</code> in <code class="notranslate">test.js</code></li>
</ul>