Files
35f60806d7 Re-enable legacyBehavior and passHref on Link (#84500)
In https://github.com/vercel/next.js/pull/83003, `legacyBehavior` and
`passHref` were removed from `<Link>`. However, this turned out to be a
bit premature—despite most usage being covered by the newer `<Link>`
APIs, there's some use cases we don't yet have good alternatives for.

We expect to solve this with an API that uses Fragment Refs once they're
available in React. For now, we're re-enabling these flags.

---------

Co-authored-by: JJ Kasper <[email protected]>
2025-10-08 16:37:36 -07:00

14 lines
312 B
JavaScript

import { NextResponse } from 'next/server'
import { textValue, TestLink } from './lib/shared-module'
export function middleware(request) {
if (request.nextUrl.pathname === '/middleware') {
return Response.json({
textValue,
linkType: typeof TestLink,
})
}
return NextResponse.next()
}