<p dir="auto">Issue repository: <a href="https://github.com/ahalimkara/next-routing-issue">https://github.com/ahalimkara/next-routing-issue</a><br>
Example: <a href="https://next-routing-issue-etmpnbuodz.now.sh" rel="nofollow">https://next-routing-issue-etmpnbuodz.now.sh</a></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">When navigating on Client side and also when directly enter path on browser address bar, it should show <code class="notranslate">Page B</code> content for path <code class="notranslate">/a</code> and <code class="notranslate">Page A</code> for <code class="notranslate">/b</code> path.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">On client side: when navigating by clicking links it shows <code class="notranslate">Page A</code> content for path <code class="notranslate">/a</code> and when I refresh page it shows <code class="notranslate">Page B</code> content for path <code class="notranslate">/a</code>, same for path <code class="notranslate">/b</code>.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Clone issue repository</li>
<li><code class="notranslate">yarn dev</code></li>
</ol>
<h2 dir="auto">Context</h2>


<p dir="auto">Trying to use custom server routing.</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>4.2.3</td>
</tr>
<tr>
<td>node</td>
<td>8.5.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table>
<h2 dir="auto">Question</h2>
<p dir="auto">When using custom server routing, <a href="https://github.com/zeit/next.js/blob/e451218900b16e721db10413734ca7a964c53677/server/index.js#L197">this</a> <code class="notranslate">path-pattern</code> shouldn't be customized in some how? So when serving pages when navigating on client side (<code class="notranslate">http://localhost:3000/_next/[id]/page/a.js</code>) it will use same patterns. <a href="https://github.com/zeit/next.js/blob/e451218900b16e721db10413734ca7a964c53677/server/index.js#L202">Example</a>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (page === '/a') {
  page = '/b';
} else if (page === '/b') {
  page = '/a';
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">page</span> <span class="pl-c1">===</span> <span class="pl-s">'/a'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-s">'/b'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">page</span> <span class="pl-c1">===</span> <span class="pl-s">'/b'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-s">'/a'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<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>
<p dir="auto">First let me thank you guys for this wonderful library, I know the effort you are putting here. thanks</p>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">I'm using <a href="https://github.com/FezVrasta/react-popper"><code class="notranslate">react-popper</code></a> library for tooltips positioning.<br>
it works in dev env, and it should work in prod env using <code class="notranslate">next build</code> command.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">it breaks in build mode when importing the above library</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li><code class="notranslate">yarn add react-popper</code></li>
<li>integrate the sample code from the readme</li>
<li><code class="notranslate">yarn run build</code> alias for <code class="notranslate">next build</code></li>
</ol>
<h2 dir="auto">Context</h2>


<p dir="auto">I want to use <code class="notranslate">react-popper</code> for tooltip positioning</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>5.1.0</td>
</tr>
<tr>
<td>node</td>
<td>v8.5.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS High Sierra v10.13.4 (17E199)</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome Version 66</td>
</tr>
</tbody>
</table>