<h1 dir="auto">Feature request</h1>
<p dir="auto">I'm writing a Next app on Windows and deploying it on Elastic Beanstalk. The deployment process involves running <code class="notranslate">next build</code> locally and then deploying the necessary files along with the <code class="notranslate">.next</code> folder to Elastic Beanstalk. However, this isn't possible since the files in the <code class="notranslate">.next</code> build folder use os-specific directory separators, making any build from a Windows machine incompatible with one on a Linux machine.</p>
<p dir="auto"><del>What I'd like to see done is have a configuration option that would allow you to specify the directory separator used in build files to either the system default, <code class="notranslate">/</code>, or <code class="notranslate">\</code>.</del> or preferrably, replace the directory separators at runtime to support the build in any operating system.</p>
<p dir="auto">While running <code class="notranslate">next build</code> is still an option, I've personally had issues with permissions doing while building locally works, that is, after manually changing all the directory separators in the config files in the <code class="notranslate">.next</code> folder.</p>
<p dir="auto">EDIT: after posting this last night, I thought it over and realized that just making the changes at runtime when parsing the build folder would be more user intuitive.</p>
<ul dir="auto">
<li>[ x] 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">Assuming the code below and an ID param of 1, when this Link is clicked the URL should be masked as speaker/1, with the Link navigating via query params, i.e. speaker?id=1</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Link prefetch href={`/speaker?id=${this.props.id}`} as={`/speaker/${this.props.id}`} &gt;
   &lt;div&gt;some content&lt;/div&gt;
 &lt;/Link&gt; "><pre class="notranslate"><code class="notranslate">&lt;Link prefetch href={`/speaker?id=${this.props.id}`} as={`/speaker/${this.props.id}`} &gt;
   &lt;div&gt;some content&lt;/div&gt;
 &lt;/Link&gt; 
</code></pre></div>
<p dir="auto">This code updates the URL correctly as speaker/1 but does not navigate anywhere.</p>
<p dir="auto">Also, the query params are not working. When I try to manually navigate to a page via query params it does not work. I've tested out using query params with other pages in the app and it is working fine.</p>
<p dir="auto">When I take away the query params from the 'href' attribute and remove the 'as' attribute, the navigation works, except that a 404 page flickers for a moment on page load.<br>
(i.e. <code class="notranslate">&lt;Link href={`/speaker/${this.props.id}`&gt; </code> )</p>
<p dir="auto">I have heard of others with the same issue, but I haven't found a solution that works.</p>
<p dir="auto">For reference, the following is the routing on the server:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app.prepare()
.then(() =&gt; {
  const server = express()

  server.get('/speaker/:id', (req, res) =&gt; {
    const actualPage = '/speaker';
    const queryParams = { id: req.params.id };
    app.render(req, res, actualPage, queryParams);
  })

  server.get('*', (req, res) =&gt; {
    return handle(req, res)
  })

  server.listen(3000, err =&gt; err ? console.log(err) : console.log(`Server listening on http://localhost:${port}`));
})
.catch((ex) =&gt; {
  console.error(ex.stack)
  process.exit(1)
})"><pre class="notranslate"><code class="notranslate">app.prepare()
.then(() =&gt; {
  const server = express()

  server.get('/speaker/:id', (req, res) =&gt; {
    const actualPage = '/speaker';
    const queryParams = { id: req.params.id };
    app.render(req, res, actualPage, queryParams);
  })

  server.get('*', (req, res) =&gt; {
    return handle(req, res)
  })

  server.listen(3000, err =&gt; err ? console.log(err) : console.log(`Server listening on http://localhost:${port}`));
})
.catch((ex) =&gt; {
  console.error(ex.stack)
  process.exit(1)
})
</code></pre></div>