Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support --persist-to command flag from wrangler to link local miniflares in Monorepo situation #518

Closed
2 tasks done
celestial-rose opened this issue Mar 30, 2025 · 3 comments
Labels
enhancement New feature or request triage

Comments

@celestial-rose
Copy link

Is your feature request related to a problem?

Hey team, thanks a million for your work
I just stumbled upon this piece of docs in Cloudflare's documentation
https://developers.cloudflare.com/d1/best-practices/local-development/#persist-data

I wasn't aware of this command
wrangler dev --persist-to=/path/to/file

This would help a lot in a monorepo setup, I am building @celestial-rose/stack and I am currently doing some workaround with ugly symlinks to perform the link between local .wrangler states.

Describe the solution you'd like

Passing the path of this command to the new 0.6 opennextjs-cloudflare build command

Describe alternatives you've considered

It could also be a key in the initial object for initOpenNextCloudflareForDev() since even when running next dev thanks to this config in next.config.mjs, it builds the .wrangler directory anyway.
I actually would prefer that but I guess it's more work

@opennextjs/cloudflare version

0.5

Additional context

No response

Before submitting

  • I have checked that there isn't already a similar feature request
  • This is a single feature (not multiple features in one request)
@celestial-rose celestial-rose added enhancement New feature or request triage labels Mar 30, 2025
@james-elicx
Copy link
Collaborator

james-elicx commented Apr 1, 2025

You should be able to pass this flag to our opennextjs-cloudflare preview and opennextjs-cloudflare deploy already.

I'm not sure I follow the reason behind passing it to the opennextjs-cloudflare build command - would be good to understand how it would be expected to be used there.

Adding the option to pass it to initOpenNextCloudflareForDev({ ... } ) is being addressed in #469

@vicb
Copy link
Contributor

vicb commented Apr 1, 2025

@celestial-rose, #469 is part of the 0.6.6 release.

Can this feature request be closed now?

@celestial-rose
Copy link
Author

celestial-rose commented Apr 1, 2025

Very cool stuff ! Thanks ! I have a solid argument to migrate https://github.com/celestial-rose/stack to 0.6 now
No - no specific need besides having it in the CLI other than being consistent with Wrangler's API
Closing !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

3 participants