You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/chilly-dryers-begin.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@
4
4
5
5
introduce new `initOpenNextCloudflareForDev` utility and make `getCloudflareContext` synchronous
6
6
7
-
introduce a new `initOpenNextCloudflareForDev` function that when called in the [Next.js config file](https://nextjs.org/docs/app/api-reference/config/next-config-js) integrates the Next.js dev server with the open-next Cloudflare adapter. Most noticeably this enables `getCloudflareContext` to work in
8
-
the edge runtime (including middlewares) during development.
7
+
this change introduces a new `initOpenNextCloudflareForDev` function that must called in the [Next.js config file](https://nextjs.org/docs/app/api-reference/config/next-config-js) to integrate the Next.js dev server with the open-next Cloudflare adapter.
9
8
10
-
Moving forward we'll recommend that all applications include the use of this utility in their config file (there is no downside in doing so and it only effect local development).
9
+
Also makes `getCloudflareContext` synchronous, so `await`ing such function is no longer necessary.
10
+
11
+
Additionally the `getCloudflareContext` can now work during local development (`next dev`) in the edge runtime (including middlewares).
12
+
13
+
Moving forward we'll recommend that all applications include the use of the `initOpenNextCloudflareForDev` utility in their config file (there is no downside in doing so and it only effect local development).
11
14
12
15
Example:
13
16
@@ -23,5 +26,3 @@ const nextConfig = {};
23
26
24
27
exportdefaultnextConfig;
25
28
```
26
-
27
-
thanks to this new utility we are also able to make `getCloudflareContext` synchronous, so `await`ing such function is no longer necessary
0 commit comments