<h1 dir="auto">Bug report</h1>
<p dir="auto">The dynamic routing solution doesn't work at all</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">I have this code using <code class="notranslate">material-ui</code><br>
I have this button</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Link 
        href='/r/[id]'                  
        as={`/r/${selected.id}`}
        passHref&gt;
            &lt;Button component=&quot;a&quot; variant=&quot;outlined&quot; size=&quot;small&quot;&gt;View Menu&lt;/Button&gt;
&lt;/Link&gt;"><pre class="notranslate"><code class="notranslate">&lt;Link 
        href='/r/[id]'                  
        as={`/r/${selected.id}`}
        passHref&gt;
            &lt;Button component="a" variant="outlined" size="small"&gt;View Menu&lt;/Button&gt;
&lt;/Link&gt;
</code></pre></div>
<p dir="auto">on the other page</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { useRouter } from 'next/router';
const Index = () =&gt; {
  const router = useRouter()
  console.log(router.query.id)
  return (
     )
}"><pre class="notranslate"><code class="notranslate">import { useRouter } from 'next/router';
const Index = () =&gt; {
  const router = useRouter()
  console.log(router.query.id)
  return (
     )
}
</code></pre></div>
<p dir="auto">The <code class="notranslate">next.config.js</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const withOffline = require('next-offline');
const withCSS = require('@zeit/next-css')

const nextConfig = {
  target: 'serverless',
  transformManifest: manifest =&gt; ['/'].concat(manifest),
  workboxOpts: {
    swDest: 'static/service-worker.js',
    runtimeCaching: [
      {
        urlPattern: /^https?.*/,
        handler: 'NetworkFirst',
        options: {
          cacheName: 'https-calls',
          networkTimeoutSeconds: 15,
          expiration: {
            maxEntries: 150,
            maxAgeSeconds: 30 * 24 * 60 * 60, // 1 month
          },
          cacheableResponse: {
            statuses: [0, 200],
          },          
        },
      },
    ],
    maximumFileSizeToCacheInBytes: 5 * 1024 * 1024
  },
};

module.exports = withOffline(withCSS(nextConfig));"><pre class="notranslate"><code class="notranslate">const withOffline = require('next-offline');
const withCSS = require('@zeit/next-css')

const nextConfig = {
  target: 'serverless',
  transformManifest: manifest =&gt; ['/'].concat(manifest),
  workboxOpts: {
    swDest: 'static/service-worker.js',
    runtimeCaching: [
      {
        urlPattern: /^https?.*/,
        handler: 'NetworkFirst',
        options: {
          cacheName: 'https-calls',
          networkTimeoutSeconds: 15,
          expiration: {
            maxEntries: 150,
            maxAgeSeconds: 30 * 24 * 60 * 60, // 1 month
          },
          cacheableResponse: {
            statuses: [0, 200],
          },          
        },
      },
    ],
    maximumFileSizeToCacheInBytes: 5 * 1024 * 1024
  },
};

module.exports = withOffline(withCSS(nextConfig));
</code></pre></div>
<p dir="auto">and the<code class="notranslate"> now.json</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;version&quot;: 2,
  &quot;routes&quot;: [	
    {	
      &quot;src&quot;: &quot;^/service-worker.js$&quot;,	
      &quot;dest&quot;: &quot;/_next/static/service-worker.js&quot;,
      &quot;headers&quot;: {
        &quot;cache-control&quot;: &quot;public, max-age=43200, immutable&quot;,
        &quot;Service-Worker-Allowed&quot;: &quot;/&quot;
      }
    }
  ],
  &quot;builds&quot;: [
    {
      &quot;src&quot;: &quot;next.config.js&quot;,
      &quot;use&quot;: &quot;@now/next&quot;
    }
  ]
}"><pre class="notranslate"><code class="notranslate">{
  "version": 2,
  "routes": [	
    {	
      "src": "^/service-worker.js$",	
      "dest": "/_next/static/service-worker.js",
      "headers": {
        "cache-control": "public, max-age=43200, immutable",
        "Service-Worker-Allowed": "/"
      }
    }
  ],
  "builds": [
    {
      "src": "next.config.js",
      "use": "@now/next"
    }
  ]
}
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expect to move to a new route but nothing happens</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows</li>
<li>Browser : chrome</li>
<li>Version of Next.js: [e.g. 9.0.6]</li>
</ul>
<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>
<p dir="auto">As stated in the title, for dynamic pages defined in the <code class="notranslate">exportPathMap</code> there are no generated <code class="notranslate">index.js</code> files. This brakes the <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-router">next-router</a>.<br>
For example <code class="notranslate">http://blog.schoenwald.media/_next/a7725bcd-89fa-4f04-950c-54d296a9e9d9/page/tag/css/index.js</code></p>
<p dir="auto">As you can see here:</p>
<ul dir="auto">
<li><a href="https://issue-3091.schoenwald-media.de" rel="nofollow">https://issue-3091.schoenwald-media.de</a></li>
<li><a href="https://github.com/schoenwaldnils/blog/tree/issue-3091">https://github.com/schoenwaldnils/blog/tree/issue-3091</a></li>
<li><a href="https://github.com/schoenwaldnils/blog/blob/issue-3091/next.config.js">next.config.js</a></li>
<li><a href="https://travis-ci.org/schoenwaldnils/blog/builds/287982634" rel="nofollow">Travis build (see line 4069 and following)</a></li>
<li>the generated files on gh-pages: <a href="https://github.com/schoenwaldnils/blog/tree/gh-pages">https://github.com/schoenwaldnils/blog/tree/gh-pages</a></li>
</ul>
<p dir="auto">the generated pathMap:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;/&quot;: {
    &quot;page&quot;: &quot;/&quot;,
    &quot;query&quot;: {
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;6uzkBYXsME0CiSwMI8isSY&quot;,
        &quot;url&quot;: &quot;/sticky-footer-with-flexbox&quot;
      }, {
        &quot;id&quot;: &quot;4iJ3AOLOmIqykMw4qAKw4Y&quot;,
        &quot;url&quot;: &quot;/hello-world&quot;
      }]
    }
  },
  &quot;/imprint&quot;: {
    &quot;page&quot;: &quot;/page&quot;,
    &quot;query&quot;: {
      &quot;id&quot;: &quot;5Wa2mgh3zOuku4GqOQEuAG&quot;
    }
  },
  &quot;/about&quot;: {
    &quot;page&quot;: &quot;/page&quot;,
    &quot;query&quot;: {
      &quot;id&quot;: &quot;yBv8udv1XqwkEMmew0Wwi&quot;
    }
  },
  &quot;/sticky-footer-with-flexbox&quot;: {
    &quot;page&quot;: &quot;/page&quot;,
    &quot;query&quot;: {
      &quot;id&quot;: &quot;6uzkBYXsME0CiSwMI8isSY&quot;
    }
  },
  &quot;/hello-world&quot;: {
    &quot;page&quot;: &quot;/page&quot;,
    &quot;query&quot;: {
      &quot;id&quot;: &quot;4iJ3AOLOmIqykMw4qAKw4Y&quot;
    }
  },
  &quot;/tag/css&quot;: {
    &quot;page&quot;: &quot;/tag&quot;,
    &quot;query&quot;: {
      &quot;tag&quot;: &quot;css&quot;,
      &quot;tags&quot;: [&quot;css&quot;, &quot;flexbox&quot;, &quot;footer&quot;, &quot;Hello&quot;, &quot;world&quot;],
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;6uzkBYXsME0CiSwMI8isSY&quot;,
        &quot;url&quot;: &quot;/sticky-footer-with-flexbox&quot;
      }]
    }
  },
  &quot;/tag/Hello&quot;: {
    &quot;page&quot;: &quot;/tag&quot;,
    &quot;query&quot;: {
      &quot;tag&quot;: &quot;Hello&quot;,
      &quot;tags&quot;: [&quot;css&quot;, &quot;flexbox&quot;, &quot;footer&quot;, &quot;Hello&quot;, &quot;world&quot;],
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;4iJ3AOLOmIqykMw4qAKw4Y&quot;,
        &quot;url&quot;: &quot;/hello-world&quot;
      }]
    }
  },
  &quot;/tag/world&quot;: {
    &quot;page&quot;: &quot;/tag&quot;,
    &quot;query&quot;: {
      &quot;tag&quot;: &quot;world&quot;,
      &quot;tags&quot;: [&quot;css&quot;, &quot;flexbox&quot;, &quot;footer&quot;, &quot;Hello&quot;, &quot;world&quot;],
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;4iJ3AOLOmIqykMw4qAKw4Y&quot;,
        &quot;url&quot;: &quot;/hello-world&quot;
      }]
    }
  },
  &quot;/tag/footer&quot;: {
    &quot;page&quot;: &quot;/tag&quot;,
    &quot;query&quot;: {
      &quot;tag&quot;: &quot;footer&quot;,
      &quot;tags&quot;: [&quot;css&quot;, &quot;flexbox&quot;, &quot;footer&quot;, &quot;Hello&quot;, &quot;world&quot;],
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;6uzkBYXsME0CiSwMI8isSY&quot;,
        &quot;url&quot;: &quot;/sticky-footer-with-flexbox&quot;
      }]
    }
  },
  &quot;/tag/flexbox&quot;: {
    &quot;page&quot;: &quot;/tag&quot;,
    &quot;query&quot;: {
      &quot;tag&quot;: &quot;flexbox&quot;,
      &quot;tags&quot;: [&quot;css&quot;, &quot;flexbox&quot;, &quot;footer&quot;, &quot;Hello&quot;, &quot;world&quot;],
      &quot;posts&quot;: [{
        &quot;id&quot;: &quot;6uzkBYXsME0CiSwMI8isSY&quot;,
        &quot;url&quot;: &quot;/sticky-footer-with-flexbox&quot;
      }]
    }
  }
}"><pre class="notranslate">{
  <span class="pl-ent">"/"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>6uzkBYXsME0CiSwMI8isSY<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/sticky-footer-with-flexbox<span class="pl-pds">"</span></span>
      }, {
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>4iJ3AOLOmIqykMw4qAKw4Y<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/hello-world<span class="pl-pds">"</span></span>
      }]
    }
  },
  <span class="pl-ent">"/imprint"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/page<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>5Wa2mgh3zOuku4GqOQEuAG<span class="pl-pds">"</span></span>
    }
  },
  <span class="pl-ent">"/about"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/page<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>yBv8udv1XqwkEMmew0Wwi<span class="pl-pds">"</span></span>
    }
  },
  <span class="pl-ent">"/sticky-footer-with-flexbox"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/page<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>6uzkBYXsME0CiSwMI8isSY<span class="pl-pds">"</span></span>
    }
  },
  <span class="pl-ent">"/hello-world"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/page<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>4iJ3AOLOmIqykMw4qAKw4Y<span class="pl-pds">"</span></span>
    }
  },
  <span class="pl-ent">"/tag/css"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tag<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"tag"</span>: <span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"tags"</span>: [<span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>],
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>6uzkBYXsME0CiSwMI8isSY<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/sticky-footer-with-flexbox<span class="pl-pds">"</span></span>
      }]
    }
  },
  <span class="pl-ent">"/tag/Hello"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tag<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"tag"</span>: <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"tags"</span>: [<span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>],
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>4iJ3AOLOmIqykMw4qAKw4Y<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/hello-world<span class="pl-pds">"</span></span>
      }]
    }
  },
  <span class="pl-ent">"/tag/world"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tag<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"tag"</span>: <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"tags"</span>: [<span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>],
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>4iJ3AOLOmIqykMw4qAKw4Y<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/hello-world<span class="pl-pds">"</span></span>
      }]
    }
  },
  <span class="pl-ent">"/tag/footer"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tag<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"tag"</span>: <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"tags"</span>: [<span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>],
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>6uzkBYXsME0CiSwMI8isSY<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/sticky-footer-with-flexbox<span class="pl-pds">"</span></span>
      }]
    }
  },
  <span class="pl-ent">"/tag/flexbox"</span>: {
    <span class="pl-ent">"page"</span>: <span class="pl-s"><span class="pl-pds">"</span>/tag<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"query"</span>: {
      <span class="pl-ent">"tag"</span>: <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"tags"</span>: [<span class="pl-s"><span class="pl-pds">"</span>css<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flexbox<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>footer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>Hello<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>world<span class="pl-pds">"</span></span>],
      <span class="pl-ent">"posts"</span>: [{
        <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>6uzkBYXsME0CiSwMI8isSY<span class="pl-pds">"</span></span>,
        <span class="pl-ent">"url"</span>: <span class="pl-s"><span class="pl-pds">"</span>/sticky-footer-with-flexbox<span class="pl-pds">"</span></span>
      }]
    }
  }
}</pre></div>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>~4.0.3</td>
</tr>
<tr>
<td>node</td>
<td>8.4.0</td>
</tr>
</tbody>
</table>