Skip to content

wrangler: feat: wrangler preview_urls default to workers_dev#10939

Merged
petebacondarwin merged 2 commits intocloudflare:mainfrom
danielrs:drivas/wrangler-preview-urls-default-to-workers-dev
Oct 16, 2025
Merged

wrangler: feat: wrangler preview_urls default to workers_dev#10939
petebacondarwin merged 2 commits intocloudflare:mainfrom
danielrs:drivas/wrangler-preview-urls-default-to-workers-dev

Conversation

@danielrs
Copy link
Copy Markdown
Contributor

@danielrs danielrs commented Oct 9, 2025

Fixes #10722.

Also tracked internally: https://jira.cfdata.org/browse/WC-4085.

Describe your change...

Originally, we were defaulting config.preview_urls to true, but we were accidentally enabling Preview URLs for users that only had config.workers_dev=false.

Then, we set the default value of config.preview_urls to false, but we were accidentally disabling Preview URLs for users that only had config.workers_dev=true.

Rather than defaulting config.preview_urls to true or false, we default to the resolved value of config.workers_dev. Should result in a clearer user experience.


@danielrs danielrs requested a review from a team as a code owner October 9, 2025 22:34
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 9, 2025

🦋 Changeset detected

Latest commit: 1cf2d81

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 9, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10939

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10939

miniflare

npm i https://pkg.pr.new/miniflare@10939

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10939

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10939

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10939

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10939

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10939

wrangler

npm i https://pkg.pr.new/wrangler@10939

commit: 1cf2d81

@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-workers-dev branch from 4639ec6 to fd6d822 Compare October 10, 2025 15:36
@danielrs
Copy link
Copy Markdown
Contributor Author

danielrs commented Oct 13, 2025

  • Wait for API changes before merging.

@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-workers-dev branch from 4ca8192 to 4d56f5d Compare October 14, 2025 13:26
Originally, we were defaulting config.preview_urls to `true`, but we
were accidentally enabling Preview URLs for users that only had
config.workers_dev=false.

Then, we set the default value of config.preview_urls to `false`, but we
were accidentally disabling Preview URLs for users that only had
config.workers_dev=true.

Rather than defaulting config.preview_urls to `true` or `false`, we
default to the resolved value of config.workers_dev. Should result in a
clearer user experience.
Instead of resolving the value of config.preview_urls in Wrangler, let
the API decide what the default value is.
@danielrs danielrs force-pushed the drivas/wrangler-preview-urls-default-to-workers-dev branch from 4d56f5d to 1cf2d81 Compare October 15, 2025 16:14
@danielrs
Copy link
Copy Markdown
Contributor Author

  • Also tested manually using local build.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 16, 2025
@petebacondarwin petebacondarwin merged commit d4b4c90 into cloudflare:main Oct 16, 2025
39 of 44 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 16, 2025
@danielrs danielrs deleted the drivas/wrangler-preview-urls-default-to-workers-dev branch October 16, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Invoking wrangler deploy w/o config forcibly resets preview URLs

4 participants