this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add `WORKER_SELF_REFERENCE` service configuration to the `wrangler.jsonc` template (#1020)

* Add `WORKER_SELF_REFERENCE` service configuration to the `wrangler.jsonc` template

* fixup! replace all occurences

---------

Co-authored-by: Victor Berchet <victor@suumit.com>

authored by

Dario Piotrowicz
Victor Berchet
and committed by
GitHub
07919d84 f8dc12ea

+12 -1
+5
.changeset/major-bugs-wave.md
··· 1 + --- 2 + "@opennextjs/cloudflare": minor 3 + --- 4 + 5 + Add missing WORKER_SELF_REFERENCE service binding in the wrangler.jsonc that the CLI creates
+1 -1
packages/cloudflare/src/cli/build/utils/create-config-files.ts
··· 40 40 41 41 const appName = getAppNameFromPackageJson(projectOpts.sourceDir) ?? "app-name"; 42 42 if (appName) { 43 - wranglerConfig = wranglerConfig.replace('"app-name"', JSON.stringify(appName.replaceAll("_", "-"))); 43 + wranglerConfig = wranglerConfig.replaceAll('"app-name"', JSON.stringify(appName.replaceAll("_", "-"))); 44 44 } 45 45 46 46 const compatDate = await getLatestCompatDate();
+6
packages/cloudflare/templates/wrangler.jsonc
··· 8 8 "directory": ".open-next/assets", 9 9 "binding": "ASSETS" 10 10 }, 11 + "services": [ 12 + { 13 + "binding": "WORKER_SELF_REFERENCE", 14 + "service": "app-name" 15 + } 16 + ], 11 17 "r2_buckets": [ 12 18 // Use R2 incremental cache 13 19 // See https://opennext.js.org/cloudflare/caching