Update Browser Rendering docs: compatibility_date to 2025-09-17 and add requirement notes

This commit is contained in:
kathayl 2026-01-10 02:59:53 +08:00
parent 006a23afb3
commit 937d4cddcc
4 changed files with 20 additions and 3 deletions

View file

@ -50,12 +50,16 @@ Follow these steps to deploy `@cloudflare/playwright-mcp`:
2. Make sure you have the [browser rendering](/browser-rendering/) and [durable object](/durable-objects/) bindings and [migrations](/durable-objects/reference/durable-objects-migrations/) in your wrangler configuration file.
:::note
Your Worker configuration must include the `nodejs_compat` compatibility flag and a `compatibility_date` of 2025-09-15 or later.
:::
<WranglerConfig>
```toml
name = "playwright-mcp-example"
main = "src/index.ts"
compatibility_date = "2025-03-10"
compatibility_date = "2025-09-17"
compatibility_flags = ["nodejs_compat"]
[browser]

View file

@ -51,6 +51,11 @@ Install the necessary dependencies:
### 2. Configure your Worker
Update your wrangler configuration file to include the bindings for Browser Rendering and [Workers AI](/workers-ai/):
:::note
Your Worker configuration must include the `nodejs_compat` compatibility flag and a `compatibility_date` of 2025-09-15 or later.
:::
<WranglerConfig>
```jsonc
{

View file

@ -63,12 +63,16 @@ Configure your `browser-worker` project's [Wrangler configuration file](/workers
Update your Wrangler configuration file with the Browser Rendering API binding, the R2 bucket you created and a Durable Object:
:::note
Your Worker configuration must include the `nodejs_compat` compatibility flag and a `compatibility_date` of 2025-09-15 or later.
:::
<WranglerConfig>
```toml
name = "rendering-api-demo"
main = "src/index.js"
compatibility_date = "2023-09-04"
compatibility_date = "2025-09-17"
compatibility_flags = [ "nodejs_compat"]
account_id = "<ACCOUNT_ID>"

View file

@ -41,12 +41,16 @@ In your `browser-worker` directory, install Cloudflare's [fork of Puppeteer](/br
## 3. Configure the [Wrangler configuration file](/workers/wrangler/configuration/)
:::note
Your Worker configuration must include the `nodejs_compat` compatibility flag and a `compatibility_date` of 2025-09-15 or later.
:::
<WranglerConfig>
```toml
name = "browser-worker"
main = "src/index.ts"
compatibility_date = "2023-03-14"
compatibility_date = "2025-09-17"
compatibility_flags = [ "nodejs_compat" ]
browser = { binding = "MYBROWSER" }