stibbs
CDCloudflare Developers
•Created by stibbs on 11/7/2024 in #pages-help
How to use --persist-to flag when starting local FE with e.g., vite dev?
You can set the options for
getPlatformProxy
in adapter-cloudflare
Remember to append /v3
to the adapter persist path because getPlatformProxy does not add that by default, whereas wrangler --persist-to
does
3 replies
CDCloudflare Developers
•Created by stibbs on 11/7/2024 in #pages-help
How to use --persist-to flag when starting local FE with e.g., vite dev?
Reading through this post from April 2024 Blazing fast development with full stack frameworks and Cloudflare makes me think there might be a way via getPlatformProxy which can accept an argument like
persist: "./my-directory/v3"
. However I can't see how to actually make use of this knowledge 😅3 replies
CDCloudflare Developers
•Created by stibbs on 5/1/2024 in #pages-help
How do I work with local D1 in a SvelteKit project?
I don’t know how to mark as solved (on my phone currently and can’t see an option?)
8 replies
CDCloudflare Developers
•Created by stibbs on 5/1/2024 in #pages-help
How do I work with local D1 in a SvelteKit project?
Yes, following those two guides did the trick
8 replies
CDCloudflare Developers
•Created by stibbs on 5/10/2024 in #workers-help
How to rapidly validate if a JS package will work on Workers runtime?
Do most (complying) packages mention that? https://github.com/stripe/stripe-node (this is what
pnpm add stripe
installs) doesn’t seem to mention it but does work? Maybe I’m looking in the wrong place5 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
But the other way could also work
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
Ah right. I was thinking it was a wrangler bug and they could make them accessible as env vars instead of bindings
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
...do you know where I would do that?
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
But you are right I'll submit a bug 🙂
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
It does work when deployed, it's the local dev experience that requires the workaround
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
The lesser evil is probably just keeping your local dev
.env
aligned to your wrangler.toml
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
Yes for secrets it would be equivalent. But then you need a workaround for non-secret environment variables as we discussed. Neither approach is "great"
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
https://developers.cloudflare.com/workers/configuration/environment-variables/ is clear that wrangler environment variables are bindings, not environment variables.
Environment variables are a type of binding that allow you to attach text strings or JSON values to your Worker.
52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
Using the
platform.env.
approach makes me fear for my future self when I've forgotten what I've done and something goes wrong 😅52 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
Via a
load
?52 replies