From 77d8372802176a8c9de33d137aa6f00011a9a062 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 24 Jan 2025 07:46:32 +0100 Subject: [PATCH] doc: update README to use wrangler.json --- packages/cloudflare/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/cloudflare/README.md b/packages/cloudflare/README.md index 10e612d9..fe083089 100644 --- a/packages/cloudflare/README.md +++ b/packages/cloudflare/README.md @@ -22,19 +22,21 @@ You can use [`create-next-app`](https://nextjs.org/docs/pages/api-reference/cli/ bun add -D wrangler@latest @opennextjs/cloudflare ``` -- add a `wrangler.toml` at the root of your project - - ```toml - #:schema node_modules/wrangler/config-schema.json - name = "" - main = ".open-next/worker.js" - - compatibility_date = "2024-09-23" - compatibility_flags = ["nodejs_compat"] - - # Use the new Workers + Assets to host the static frontend files - assets = { directory = ".open-next/assets", binding = "ASSETS" } - ``` +- add a `wrangler.json` at the root of your project + +```json +{ + "$schema": "node_modules/wrangler/config-schema.json", + "main": ".open-next/worker.js", + "name": "", + "compatibility_date": "2024-12-30", + "compatibility_flags": ["nodejs_compat"], + "assets": { + "directory": ".open-next/assets", + "binding": "ASSETS" + } +} +``` - add a `open-next.config.ts` at the root of your project: