mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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]>
14 lines
312 B
JavaScript
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()
|
|
}
|