-
Notifications
You must be signed in to change notification settings - Fork 10.4k
wrangler: document the new "redirected" configuration feature #18757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
d850131
97857ae
888d08b
d928e80
146c8c2
387f3d0
58e2524
645d9a7
8f31334
0286767
da1e0bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,6 +10,7 @@ description: Use a configuration file to customize the | |||||
| --- | ||||||
|
|
||||||
| import { Render, Type, MetaInfo } from "~/components"; | ||||||
| import { FileTree } from "@astrojs/starlight/components"; | ||||||
|
|
||||||
| Wrangler optionally uses a `wrangler.json`/`wrangler.toml` file to customize the development and deployment setup for a Worker. | ||||||
|
|
||||||
|
|
@@ -1191,7 +1192,7 @@ upload_source_maps = true | |||||
|
|
||||||
| ## Workers Sites | ||||||
|
|
||||||
| <Render file="workers_sites"/> | ||||||
| <Render file="workers_sites" /> | ||||||
|
|
||||||
| [Workers Sites](/workers/configuration/sites/) allows you to host static websites, or dynamic websites using frameworks like Vue or React, on Workers. | ||||||
|
|
||||||
|
|
@@ -1252,3 +1253,92 @@ 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 <key>`. | ||||||
|
|
||||||
| ## Generated Wrangler configuration | ||||||
petebacondarwin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| :::note | ||||||
|
|
||||||
| This section describes a feature that can be implemented by frameworks and other build tools that are integrating with Wrangler. | ||||||
|
|
||||||
| It is unlikely that an application developer will need to use this feature, but it is documented here to help you understand when Wrangler is using a generated configuration rather than a user's configuration. | ||||||
petebacondarwin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ::: | ||||||
|
|
||||||
| When using a framework or a custom pre-build process, some tools need to generate a modified Wrangler configuration alongside the generated code. | ||||||
|
||||||
| When using a framework or a custom pre-build process, some tools need to generate a modified Wrangler configuration alongside the generated code. | |
| When using a framework or a custom pre-build process, some tools need to generate a new Wrangler configuration alongside the original code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we actually want to say alongside generated code. The "generated config" may get stored on disk in the same directory as the "generated/compiled source code".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to improve that.
petebacondarwin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
petebacondarwin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| A common approach that a build tool might choose to implement is to output code and configuration in a `dist` directory. | |
| For example, a new configuration file may be generated by a custom build tool when creating a `dist` directory. |
You may need to rewrite my suggestion if it doesn't make sense. I added this because I didn't quite understand the connection between this and the section above. I know it says "example" in the header, but I think it would also help to lead in by specifically saying that this is an example of when a new configuration file is generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to make it more example-ish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main suggestion would be to pick consistent language for what you're calling the original file and the new file because you were using a bunch of different terms and I think it could be confusing. In my edits, I went with the "new, generated file" and the "original, user's file", but you can choose something else, as long as it's consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tidied up