Skip to content

Commit 228ad4e

Browse files
wrangler config - add extended configuration docs
1 parent ffa4ed3 commit 228ad4e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ enabled = true
345345
head_sampling_rate = 0.1 # 10% of requests are logged
346346
```
347347

348-
349348
## Custom builds
350349

351350
You can configure a custom build step that will be run before your Worker is deployed. Refer to [Custom builds](/workers/wrangler/custom-builds/).
@@ -1181,3 +1180,15 @@ If you change your environment variables in the Cloudflare dashboard, Wrangler w
11811180
If you change your routes in the dashboard, Wrangler will override them in the next deploy with the routes you have set in your `wrangler.toml`. To manage routes via the Cloudflare dashboard only, remove any route and routes keys from your `wrangler.toml` file. Then add `workers_dev = false` to your `wrangler.toml` file. For more information, refer to [Deprecations](/workers/wrangler/deprecations/#other-deprecated-behavior).
11821181

11831182
Wrangler will not delete your secrets (encrypted environment variables) unless you run `wrangler secret delete <key>`.
1183+
1184+
## Extending user configuration
1185+
1186+
The main goal here is to allow tools to generate a partial configuration file that is merged into the user configuration when Wrangler commands are run.
1187+
1188+
The file must be written to `./.wrangler/config/extra.json`. This path is relative to the project path, which is the directory containing the wrangler.toml or the current working directory if there is no wrangler.toml.
1189+
1190+
The format of the file is a JSON object whose properties are the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. Notably it cannot contain the [top level only](/#top-level-only-keys) configuration keys.
1191+
1192+
The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.
1193+
1194+
The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.

0 commit comments

Comments
 (0)