-
Notifications
You must be signed in to change notification settings - Fork 6
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
use wrangler-proxy for vite dev scenario #3
base: main
Are you sure you want to change the base?
Conversation
Thank you for the solution, it works well for me. I just have one suggestion: I think it would be a good idea to update the README as well in order to explain how the process of starting the proxy works (and maybe add the command in a script inside package.json). |
I had more luck with cf-bindings-proxy. I've given up on wrangler-proxy |
hi could you update the PR then ? would be very useful. Thank you |
@gerhardcit I would suggest you to try the recently introduced Miniflare magic proxy 🙂 It should work quite well with your strategy, you can see how it works here: https://github.com/jculvey/svelte-cf-bindings-poc/blob/master/src/hooks.server.ts (you basically create a Miniflare instance, take its bindings and simply set those as the platform's env) |
Like this direction. Please advise on how we can get jculvey/svelte-cf-bindings-poc#1 I found that must be a option in the Miniflare constructor.
|
@gerhardcit what about the Alternatively if that doesn't work for you how about changing the path miniflare uses by specifing a persistence with different path in the - d1Persist: true,
+ d1Persist: '.wrangler/state/v3/d1', |
yes, but it's on a per-storage type basis (this is how I've applied it to our Next.js adapter for example) |
@dario-piotrowicz , thx. This means no need for proxy in dev. This is super helpful! |
See issue#1 discussion about Bindings while running wrangler pages dev.