diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index b64f2738c52062..79fc57251afb4f 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -1252,3 +1252,15 @@ If you change your environment variables in the Cloudflare dashboard, Wrangler w 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 configuration file. To manage routes via the Cloudflare dashboard only, remove any route and routes keys from your Wrangler configuration file. Then add `workers_dev = false` to your Wrangler configuration file. For more information, refer to [Deprecations](/workers/wrangler/deprecations/#other-deprecated-behavior). Wrangler will not delete your secrets (encrypted environment variables) unless you run `wrangler secret delete `. + +## Extending user configuration + +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. + +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. + +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. + +The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands. + +The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.