mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When using an unsupported API in a route handler (eg, `export const dynamic` with `cacheComponents` enabled), we were not erroring in dev or failing the build. This is because the transform only asserted on pages & layouts, and not route handlers. This updates the handling to also check route handlers. Fixes NAR-371
6 lines
122 B
TypeScript
6 lines
122 B
TypeScript
export const dynamic = 'force-static'
|
|
|
|
export async function GET(request: Request) {
|
|
return new Response('route GET')
|
|
}
|