From 6ba82fab2816302aee895920001098c266252a11 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 2 Jun 2025 18:51:45 +0100 Subject: [PATCH 1/2] Tell the reader to remove unwanted `binding` property in "Pages to Workers" migration docs This was brought up in the Wrangler Discord office hours --- .../static-assets/migration-guides/migrate-from-pages.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx b/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx index ad7829adb40090f..7944bb23766c455 100644 --- a/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx +++ b/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx @@ -79,6 +79,12 @@ Now, with **Cloudflare Workers**: +:::note + +If your Worker will only contain assets and no Worker script, then you should remove the `"binding": "ASSETS"` field from your Pages configuration file, since this is only valid if you have a Worker script indicated by a `"main"` property. See the [Assets binding](#assets-binding) section below. + +::: + #### Serving behavior Pages would automatically attempt to determine the type of project you deployed. It would look for `404.html` and `index.html` files as signals for whether the project was likely a [Single Page Application (SPA)](/pages/configuration/serving-pages/#single-page-application-spa-rendering) or if it should [serve custom 404 pages](/pages/configuration/serving-pages/#not-found-behavior). From 99334e67c59e09f6032fab806ce05cc138778aaf Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 2 Jun 2025 18:53:26 +0100 Subject: [PATCH 2/2] Update migrate-from-pages.mdx --- .../static-assets/migration-guides/migrate-from-pages.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx b/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx index 7944bb23766c455..3b3598eeffa59b7 100644 --- a/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx +++ b/src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx @@ -81,7 +81,7 @@ Now, with **Cloudflare Workers**: :::note -If your Worker will only contain assets and no Worker script, then you should remove the `"binding": "ASSETS"` field from your Pages configuration file, since this is only valid if you have a Worker script indicated by a `"main"` property. See the [Assets binding](#assets-binding) section below. +If your Worker will only contain assets and no Worker script, then you should remove the `"binding": "ASSETS"` field from your configuration file, since this is only valid if you have a Worker script indicated by a `"main"` property. See the [Assets binding](#assets-binding) section below. :::