You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/wrangler/configuration.mdx
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1323,15 +1323,13 @@ A common example of using a redirected configuration is where a custom build too
1323
1323
1324
1324
This configuration points `main` at the user's code entry-point and defines the `MY_VARIABLE` variable in two different environments.
1325
1325
1326
-
- Then, the user runs a custom build, which might read the user's Wrangler configuration file to find the source code entry-point:
1326
+
- Then, the user runs a custom build for a given environment (for example `staging`). This will read the user's Wrangler configuration file to find the source code entry-point and environment specific settings:
1327
1327
1328
1328
```bash
1329
-
> my-tool build
1329
+
> my-tool build --env=staging
1330
1330
```
1331
1331
1332
-
We'll assume that `my-tool` is specifically targeting the `staging` environment (for instance set by the user with some option of `my-tool`).
1333
-
1334
-
- This `my-tool` generates a `dist` directory that contains both compiled code and a new generated deployment configuration file, containing only the settings for the given environment.
1332
+
-`my-tool` generates a `dist` directory that contains both compiled code and a new generated deployment configuration file, containing only the settings for the given environment.
1335
1333
It also creates a `.wrangler/deploy/config.json` file that redirects Wrangler to the new, generated deployment configuration file:
0 commit comments