Skip to content

Commit 97857ae

Browse files
fixup! wrangler: document the new "redirected" configuration feature
1 parent d850131 commit 97857ae

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,9 @@ Disabling bundling is not recommended in most scenarios. Use this option only wh
7979
If your build tooling already produces build artifacts suitable for direct deployment to Cloudflare, you can opt out of bundling by using the `--no-bundle` command line flag: `npx wrangler deploy --no-bundle`. If you opt out of bundling, Wrangler will not process your code and some features introduced by Wrangler bundling (for example minification, and polyfills injection) will not be available.
8080

8181
Use [Custom Builds](/workers/wrangler/custom-builds/) to customize what Wrangler will bundle and upload to the Cloudflare global network when you use [`wrangler dev`](/workers/wrangler/commands/#dev) and [`wrangler deploy`](/workers/wrangler/commands/#deploy).
82+
83+
## Generated Wrangler configuration
84+
85+
When using a framework or a custom pre-build process, some tools need to generate a modified Wrangler configuration alongside the generated code.
86+
87+
See [Generated Wrangler configuration](/workers/wrangler/configuration/#generated-wrangler-configuration) for more information.

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: Use a configuration file to customize the
1010
---
1111

1212
import { Render, Type, MetaInfo } from "~/components";
13+
import { FileTree } from "@astrojs/starlight/components";
1314

1415
Wrangler optionally uses a `wrangler.json`/`wrangler.toml` file to customize the development and deployment setup for a Worker.
1516

@@ -1311,14 +1312,16 @@ A common approach that a build tool might choose to implement is to output code
13111312
- This `my-tool` generates a `dist` directory that contains both compiled code and a new deployment configuration file.
13121313
It also generates a `.wrangler/deploy/config.json` file that redirects Wrangler to the new generated deployment configuration file:
13131314

1314-
```plain
1315+
<FileTree>
1316+
13151317
- dist
13161318
- index.js
1317-
- wrangler.json
1319+
- wrangler.json
13181320
- .wrangler
13191321
- deploy
1320-
- config.json
1321-
```
1322+
- config.json
1323+
1324+
</FileTree>
13221325

13231326
The generated `dist/wrangler.json` might contain:
13241327

0 commit comments

Comments
 (0)