Skip to content

Commit 6d6b831

Browse files
Version Packages
1 parent 8de2c04 commit 6d6b831

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

.changeset/chilly-dryers-begin.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/cloudflare/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# @opennextjs/cloudflare
22

3+
## 0.4.0
4+
5+
### Minor Changes
6+
7+
- 8de2c04: introduce new `initOpenNextCloudflareForDev` utility and make `getCloudflareContext` synchronous
8+
9+
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.
10+
11+
Also makes `getCloudflareContext` synchronous.
12+
13+
Additionally the `getCloudflareContext` can now work during local development (`next dev`) in the edge runtime (including middlewares).
14+
15+
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).
16+
17+
Example:
18+
19+
```js
20+
// next.config.mjs
21+
22+
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
23+
24+
initOpenNextCloudflareForDev();
25+
26+
/** @type {import('next').NextConfig} */
27+
const nextConfig = {};
28+
29+
export default nextConfig;
30+
```
31+
332
## 0.3.10
433

534
### Patch Changes

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opennextjs/cloudflare",
33
"description": "Cloudflare builder for next apps",
4-
"version": "0.3.10",
4+
"version": "0.4.0",
55
"type": "module",
66
"scripts": {
77
"clean": "rimraf dist",

0 commit comments

Comments
 (0)