rsnext/test/e2e/switchable-runtime
Zack Tanner 59c767b258
Allow next/headers in middleware & draftMode in edge runtime (#53465)
## What
Using methods from `next/headers` in middleware would throw a `requestAsyncStorage` invariant. Additionally, using `draftMode()` in middleware/an edge runtime is not possible

## Why
We do not expose `requestAsyncStorage` to the middleware adapter. Also, the prerender manifest wasn't available to the `EdgeRouteModuleWrapper` & middleware adapter, so it wasn't possible to enable/disable it.

## How
This makes `requestAsyncStorage` available for middleware, and makes the preview mode data available from build to the edge runtime/middleware. 

Fixes #52557
2023-08-02 20:22:35 +00:00
..
app Fix failing test on canary branch (#49038) 2023-05-01 15:23:14 +02:00
pages feat: enables 'edge' as a possible runtime for API routes (#44045) 2022-12-15 10:08:03 +01:00
utils Ensure server components entries are not part of the pages buildmanifest (#38416) 2022-07-07 22:17:17 +02:00
index.test.ts Allow next/headers in middleware & draftMode in edge runtime (#53465) 2023-08-02 20:22:35 +00:00
next.config.js Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00