mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This: - Adds a test asserting the user can override the tsconfig path via the next-config. This is already supported with Next.js and Webpack. - Implements the necessary code to pass the test and implement support with Turbopack. Test Plan: `pnpm test-dev test/e2e/tsconfig-path/index.test.ts && pnpm test-dev-turbo test/e2e/tsconfig-path/index.test.ts` Closes PACK-4215
14 lines
362 B
TypeScript
14 lines
362 B
TypeScript
import type { NextRequest } from 'next/server'
|
|
import { NextResponse } from 'next/server'
|
|
import foo from 'foo'
|
|
|
|
// This function can be marked `async` if using `await` inside
|
|
export function middleware(request: NextRequest) {
|
|
return NextResponse.json({ foo })
|
|
}
|
|
|
|
// See "Matching Paths" below to learn more
|
|
export const config = {
|
|
matcher: '/middleware',
|
|
}
|