Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/content/docs/workers/wrangler/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ enabled = true
head_sampling_rate = 0.1 # 10% of requests are logged
```


## Custom builds

You can configure a custom build step that will be run before your Worker is deployed. Refer to [Custom builds](/workers/wrangler/custom-builds/).
Expand Down Expand Up @@ -1181,3 +1180,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.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).

Wrangler will not delete your secrets (encrypted environment variables) unless you run `wrangler secret delete <key>`.

## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
You can 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Write the partial configuration file to `./.wrangler/config/extra.json` in the current project directory, which is typically the directory containing the 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 file must be a JSON object, containing the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. It cannot contain [top level only](#top-level-only-keys) keys.


The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.
The configuration in this file is merged with the the currently selected environment and applied to all Wrangler commands. No manual action is required because Wrangler automatically detects and applies the file when it is present.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this into the sentence above

Loading