Skip to content

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

Closed
@celestial-rose

Description

@celestial-rose

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions