Files
Zack TannerandGitHub 78a2eb0b9b fix interception routes with dynamic segments (#59273)
### What?
Using an interception marker next to a dynamic segment does not behave
properly when deployed to Vercel

### Why?
The named route regex that gets created is not accounting for the
interception marker, which is causing the non-intercepted route to match
the intercepted serverless function.

### How?
This factors in the interception marker when building the named route
regex so that the non-intercepted route regex properly matches when
loading the non-intercepted page.

Deployment verified here: https://test-intercept-mu.vercel.app/

Closes NEXT-1786
Fixes #54650
2023-12-05 08:47:40 -08:00

10 lines
169 B
TypeScript

import Link from 'next/link'
export default function Page() {
return (
<div>
<Link href="/foo/1">Foo</Link> <Link href="/bar/1">Foo</Link>
</div>
)
}