Files
Will Binns-SmithandGitHub 570266a445 Turbopack: Allow overriding tsconfig path via next-config (#77563)
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
2025-04-01 16:08:37 -07:00

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',
}