Skip to content

Commit

Permalink
feat(wrangler): Implement environment inheritance for Pages (#5234)
Browse files Browse the repository at this point in the history
To make it easier for users to write config files for Pages,
Wrangler will not require both of those environments to be
explicitly defined in the `wrangler.toml` file. If either
`[env.production]` or `[env.preview]` is left unspecified,
Wrangler will use the top-level Wrangler environment when
targeting that named Pages environment.

This commit implements the aforementioned environment
inheritance logic for Pages projects.

Co-authored-by: Carmen Popoviciu <cpopoviciu@cloudflare.com>
  • Loading branch information
CarmenPopoviciu and Carmen Popoviciu committed Mar 20, 2024
1 parent 00d5ee0 commit e739b7f
Show file tree
Hide file tree
Showing 5 changed files with 1,022 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changeset/fifty-rules-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": minor
---

feat: Implement environment inheritance for Pages configuration

For Pages, Wrangler will not require both of the supported named environments ("preview" | "production") to be explicitly defined in the config file. If either `[env.production]` or `[env.preview]` is left unspecified, Wrangler will use the top-level environment when targeting that named Pages environment.

0 comments on commit e739b7f

Please sign in to comment.