diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6122a660c7e851f..f7005b6c7fbe283 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ If we require more information to address your pull request, the `more-informati ## Wrangler config -If you're adding a code snippet to the docs that represents a Wrangler config file (`wrangler.toml` or `wrangler.json`) make sure you wrap it with the `` component, which ensure it's rendered as both JSON and TOML e.g. +If you're adding a code snippet to the docs that represents a Wrangler config file (`wrangler.toml`, `wrangler.json`, or `wrangler.jsonc`) make sure you wrap it with the `` component, which ensure it's rendered as both JSON and TOML e.g. ```` diff --git a/src/content/docs/workers/wrangler/api.mdx b/src/content/docs/workers/wrangler/api.mdx index 3a1a871b66cfcd7..d097174f06251f6 100644 --- a/src/content/docs/workers/wrangler/api.mdx +++ b/src/content/docs/workers/wrangler/api.mdx @@ -258,7 +258,7 @@ const platform = await getPlatformProxy(options); - `experimentalJsonConfig` boolean - If `true`, allows the utility to read a JSON config file (for example, `wrangler.json`). + If `true`, allows the utility to read a JSON config file (for example, `wrangler.json` or `wrangler.jsonc`). - `persist` boolean | `{ path: string }` diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index cd6575d7ba8a8c1..1603750c75af905 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -11,11 +11,11 @@ description: Use a configuration file to customize the import { Render, Type, MetaInfo } from "~/components"; -Wrangler optionally uses a `wrangler.json`/`wrangler.toml` file to customize the development and deployment setup for a Worker. +Wrangler optionally uses a `wrangler.json`/`wrangler.jsonc`/`wrangler.toml` file to customize the development and deployment setup for a Worker. :::note -As of Wrangler v3.91.0, Wrangler supports both JSON (`wrangler.json`) and TOML (`wrangler.toml`) for its configuration file. Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax is `JSON` rather than `TOML`. Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. +As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json` or `wrangler.jsonc`) and TOML (`wrangler.toml`) for its configuration file. Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax is `JSON` rather than `TOML`. Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. ::: diff --git a/src/content/partials/workers/wrangler-commands/global-flags.mdx b/src/content/partials/workers/wrangler-commands/global-flags.mdx index 9293e9edda9cb0f..c5b06f3211a3f1b 100644 --- a/src/content/partials/workers/wrangler-commands/global-flags.mdx +++ b/src/content/partials/workers/wrangler-commands/global-flags.mdx @@ -12,3 +12,5 @@ The following global flags work on every command: - Show version number. - `--config` (not supported by Pages) - Path to `.toml` configuration file. +- `--experimental-json-config` (not supported by Pages) + - ⚠️ This is an experimental command. Read configuration from a `wrangler.json` or `wrangler.jsonc` file, instead of `wrangler.toml`. In this case the config file is parsed as [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments). \ No newline at end of file