title: Dynamic path in next JS for static site generation
body: <p>How can we add a dynamic path in the exportPathMap in next.config.js to link to a specific page? The dynamic URL will be created during run time.</p>
  <p>Scenario-
  URL: <code>https://www.example.com/customers/32132-cid-1312</code></p>
  <p>In the above URL part after the domain is dynamic and this happens at runtime so we cannot generate pages at build time for this.</p>
  <p>How can we link all these dynamic URLs to a specific page?</p>
  <p>my next.config.js</p>
  <pre><code>exportPathMap: async function(defaultPathMap) {
      return {
        &quot;/404.html&quot;: {page: '/_error'},
        &quot;/&quot;: { page: &quot;/&quot; },
        &quot;/platform&quot;: { page: &quot;/platform&quot; },
        &quot;/customers/:id&quot;: { page: '/customers' },
      };
    }
  </code></pre>
  <p>Last part for the customer, id is dynamic and it generated at run time. And I want to link all of those to the customer's page at run time. These sets of pages for this scenario cannot be generated at runtime.</p>
  <p>Please help!</p>