Skip to content

Remove R2 from the templates used when creating wrangler.jsonc and open-next.config.ts files#1132

Closed
dario-piotrowicz wants to merge 1 commit intomainfrom
dario/DEVX-2491/remove-caching-from-migrate
Closed

Remove R2 from the templates used when creating wrangler.jsonc and open-next.config.ts files#1132
dario-piotrowicz wants to merge 1 commit intomainfrom
dario/DEVX-2491/remove-caching-from-migrate

Conversation

@dario-piotrowicz
Copy link
Contributor

Fixes https://jira.cfdata.org/browse/DEVX-2491

This PR removes R2 from the templates used when creating wrangler.jsonc and open-next.config.ts files since this generally results on an application that can't actually be deployed.

For more details please see the included changesets.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: ee01b88

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

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

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

pkg-pr-new bot commented Feb 17, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@1132

commit: ee01b88

Comment on lines +7 to +9
The `migrate` command no longer sets up the R2 caching in the `wrangler.jsonc` and `open-next.config.ts` files it creates, this allows newly migrated applications to be deployed right away without forcing the user to enable R2 nor set an R2 bucket.

Ideally applications should use caching for optimal results, so a warning is now also presented at the end of the migration recommending users to set up caching.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we default to the staticAssetsIncrementalCache in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we discussed this and we think that it's better not to set any caching at all, this will make it easier to users (or us if we want to provide an automated way to then configure caching) to apply a caching implementation.

If we were to set a different caching solution, like the static or kv ones, then if people later wanted to move onto R2 there'd be more steps to do that, so it seems better to just not set anything at all here (instead of setting something sub-par).

what do you think? 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean, i think we should be serving the stuff generated at build-time from static assets for the incremental cache, shouldn't we? i guess it falls back to the dummy one otherwise. up to you /shrug

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss more before doing this.

@dario-piotrowicz
Copy link
Contributor Author

Closing in favour of #1133

@dario-piotrowicz dario-piotrowicz deleted the dario/DEVX-2491/remove-caching-from-migrate branch February 18, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants