Skip to content

Commit 7e4a91e

Browse files
authored
chore(cloudflare): Add jsonc snippet to cloudflare readme (#15994)
ref getsentry/sentry-docs#13257 and getsentry/sentry-wizard#824
1 parent 9e477cd commit 7e4a91e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

packages/cloudflare/README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@ To get started, first install the `@sentry/cloudflare` package:
2222
npm install @sentry/cloudflare
2323
```
2424

25-
Then set either the `nodejs_compat` or `nodejs_als` compatibility flags in your `wrangler.toml`. This is because the SDK
26-
needs access to the `AsyncLocalStorage` API to work correctly.
27-
28-
```toml
29-
compatibility_flags = ["nodejs_compat"]
30-
# compatibility_flags = ["nodejs_als"]
25+
Then either set the `nodejs_als` or `nodejs_compat` compatibility flags in your `wrangler.jsonc`/`wrangler.toml` config. This is because the SDK needs access to the `AsyncLocalStorage` API to work correctly.
26+
27+
```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
28+
{
29+
"compatibility_flags": [
30+
"nodejs_als"
31+
// "nodejs_compat"
32+
]
33+
}
3134
```
3235

33-
Then you can either setup up the SDK for [Cloudflare Pages](#setup-cloudflare-pages) or
34-
[Cloudflare Workers](#setup-cloudflare-workers).
36+
```toml {tabTitle:Toml} {filename:wrangler.toml}
37+
compatibility_flags = ["nodejs_als"]
38+
# compatibility_flags = ["nodejs_compat"]
39+
```
3540

3641
## Setup (Cloudflare Pages)
3742

0 commit comments

Comments
 (0)