Files
JJ KasperandGitHub f8534a6e62 Fix data URL with root-catchall and basePath (#16263)
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression test has also been added to ensure this is working

Closes: https://github.com/vercel/next.js/issues/15747
2020-08-17 15:25:36 +00:00

15 lines
209 B
JavaScript

export default ({ url }) => (
<>
<h1>root catch-all</h1>
<p id="url">{url}</p>
</>
)
export const getServerSideProps = ({ req, res }) => {
return {
props: {
url: req.url,
},
}
}