Skip to content

Commit

Permalink
update changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz committed Jan 24, 2025
1 parent 5aad339 commit cf9b45e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .changeset/chilly-dryers-begin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

introduce new `initOpenNextCloudflareForDev` utility and make `getCloudflareContext` synchronous

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
the edge runtime (including middlewares) during development.
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.

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).
Also makes `getCloudflareContext` synchronous, so `await`ing such function is no longer necessary.

Additionally the `getCloudflareContext` can now work during local development (`next dev`) in the edge runtime (including middlewares).

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).

Example:

Expand All @@ -23,5 +26,3 @@ const nextConfig = {};

export default nextConfig;
```

thanks to this new utility we are also able to make `getCloudflareContext` synchronous, so `await`ing such function is no longer necessary

0 comments on commit cf9b45e

Please sign in to comment.