<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">Amazon API Gateways have a stage in their URLs:</p>
<p dir="auto">E.g. <a href="https://vbe6aad5c.execute-api.us-east-1.amazonaws.com/prod/home" rel="nofollow">https://vbe6aad5c.execute-api.us-east-1.amazonaws.com/prod/home</a></p>
<p dir="auto">This breaks next8 serverless page deployments routing because there doesn't seem to be a way to configure nextjs with a basePath (/prod in this case).</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">I would like to be able to configure nextjs with a uri <code class="notranslate">basePath</code> which works with next's routing.</p>
<p dir="auto">Could be something like:</p>
<p dir="auto"><em>next.config.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
  uriBasePath: '/prod'
}"><pre class="notranslate"><code class="notranslate">module.exports = {
  uriBasePath: '/prod'
}
</code></pre></div>
<p dir="auto">Note <code class="notranslate">assetPrefix</code> doesn't work here because it applies only to static files AFAIK.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">Using a custom domain for the AWS API GW would solve the problem as it removes the /{stage} from the URL.</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">Following the README.md instructions on cloning and running the app should result in a running app, compiled correctly.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">Running <code class="notranslate">npm i &amp;&amp; npm run dev</code>:</p>
<ol dir="auto">
<li>Fails to build the app.  Reason is, package.json specifies older react version but latest next.js</li>
<li>After upgrading react to 16, runtime error occurs due to missing "Transform Decorators Legacy" babel plugin.</li>
<li>After running<code class="notranslate">npm install babel-plugin-transform-decorators-legacy</code> the app loads without errors.</li>
</ol>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Clone the repo in a clean environment.</li>
<li>Run <code class="notranslate">npm i &amp;&amp; npm run dev</code></li>
<li>Update React dependencies, and repeat (2)</li>
<li>Open the browser to <a href="http://localhost:3000/" rel="nofollow">http://localhost:3000/</a></li>
</ol>
<h2 dir="auto">Context</h2>


<p dir="auto">Attempting to learn how to integrate ant design into next.js app.</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.1.3</td>
</tr>
<tr>
<td>node</td>
<td>7.3.0</td>
</tr>
<tr>
<td>OS</td>
<td>MacOS Sierra 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome</td>
</tr>
<tr>
<td>react</td>
<td>^16.0.0</td>
</tr>
<tr>
<td>react-dom</td>
<td>^16.0.0</td>
</tr>
</tbody>
</table>
<h2 dir="auto">Suggested fix:</h2>
<p dir="auto">In package.json, use the following dependencies:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;dependencies&quot;: {
    &quot;antd&quot;: &quot;^2.10.2&quot;,
    &quot;babel-plugin-import&quot;: &quot;^1.1.1&quot;,
    &quot;babel-plugin-transform-decorators-legacy&quot;: &quot;^1.3.4&quot;,
    &quot;next&quot;: &quot;latest&quot;,
    &quot;react&quot;: &quot;^16.0.0&quot;,
    &quot;react-dom&quot;: &quot;^16.0.0&quot;
  }"><pre class="notranslate"><span class="pl-ent">"dependencies"</span>: {
    <span class="pl-ent">"antd"</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.10.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-plugin-import"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.1.1<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-plugin-transform-decorators-legacy"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.3.4<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"next"</span>: <span class="pl-s"><span class="pl-pds">"</span>latest<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"react"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"react-dom"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>
  }</pre></div>
<p dir="auto">or, alternatively, fix next version.  Note that with the above package.json, I see the following errors running <code class="notranslate">npm list</code> command:</p>
<p dir="auto"><code class="notranslate">npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0-0, required by react-lazy-load@3.0.12 npm ERR! peer dep missing: react@^0.14.0 || ^15.0.1, required by react-slick@0.15.4 npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.0-0, required by react-lazy-load@3.0.12 npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.1, required by react-slick@0.15.4 npm ERR! peer dep missing: jquery@&gt;=1.8.0, required by slick-carousel@1.8.1</code></p>