Skip to content

Conversation

0ta-mjn
Copy link

@0ta-mjn 0ta-mjn commented Jul 15, 2025

Based on #761 .
Old: #762

Copy link

changeset-bot bot commented Jul 15, 2025

🦋 Changeset detected

Latest commit: ea348db

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

async function populateR2IncrementalCache(
options: BuildOptions,
populateCacheOptions: { target: WranglerTarget; environment?: string }
populateCacheOptions: { target: WranglerTarget; environment?: string; config?: string }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please extract the type to top level?
(Maybe add a comment here that the cacheChunkSize is not used)

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.

LGTM, thanks a lot for the PR 🙏

@james-elicx Could you please take a look when you have time

Copy link

pkg-pr-new bot commented Jul 15, 2025

Open in StackBlitz

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

commit: ea348db

Copy link
Collaborator

@james-elicx james-elicx left a comment

Choose a reason for hiding this comment

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

Thanks!

@vicb vicb mentioned this pull request Jul 20, 2025
5 tasks
@vicb
Copy link
Contributor

vicb commented Jul 23, 2025

@0ta-mjn We finally went with #791 that James created.

It makes the CLI more robust and more extensible and has a better UX.

We really appreciate the energy you put in this PR, sorry that we end up merging it :(

You feature request should now be addressed.

@vicb vicb closed this Jul 23, 2025
@alex-all3dp
Copy link
Contributor

@vicb I tested 1.6.0 and tried to run opennextjs-cloudflare preview --config wrangler.dev.jsonc but it does not use the given config it appears, from the errors I get. When running wrangler dev --config wrangler.dev.jsonc it works as expected. Is --config really available for all commands now, as was intended with this PR?

@james-elicx
Copy link
Collaborator

@vicb I tested 1.6.0 and tried to run opennextjs-cloudflare preview --config wrangler.dev.jsonc but it does not use the given config it appears, from the errors I get. When running wrangler dev --config wrangler.dev.jsonc it works as expected. Is --config really available for all commands now, as was intended with this PR?

Hi @alex-all3dp, I've just run the following command:

pnpm --filter static-assets-incremental-cache exec opennextjs-cloudflare preview --config wrangler.jsonc

And the following is the command that we ran in response to that:

pnpm exec wrangler dev --config wrangler.jsonc

So it looks like the config arg is being passed along. Are you able to expand on what you're seeing?

@james-elicx
Copy link
Collaborator

james-elicx commented Jul 23, 2025

Are you referring to cache population instead?

Do you have an example of the errors?

@vicb
Copy link
Contributor

vicb commented Jul 23, 2025

Oh I guess the pb might be with initOpenNextCloudflareForDev(); called from the build.

@alex-all3dp would you mind creating a new issue with logs?

Thanks!

@vicb
Copy link
Contributor

vicb commented Jul 23, 2025

^if that's confirmed we could add NEXT_DEV_WRANGLER_CONFIG (similar to NEXT_DEV_WRANGLER_ENV) and have the CLI set that when the flags are passed.

@alex-all3dp
Copy link
Contributor

Removing initOpenNextCloudflareForDev() from the next.config didn't change it. I'll look into creating a separate issue with more infos

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.

4 participants