boggin
boggin
Explore posts from servers
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
? Wondering about the deprecation? wrangler says to clarify a directory if using --command, but I want it to run from Vite, not the build
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
I am using the svelte-adapter-cloudflare adapter which mentions getPlatformProxy (no explanation besides offering an option), I've set environment variables to a test KV and a test R2, I've attached the getplatformProxy to event in my hooks.servers.ts, and my platform.env still doesnt show anything when running any of the above dev environment commands.
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
Please someone help.
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
and then there's getPlatformProxy which is only mentioned but not wholly explained in the documentation.
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
when I run bunx wrangler pages dev ./ --command \"bun run vite\" it looks like it's running but nothing is actually served on my 5173 port. I don't understand the --proxy flag enough to understand how I'd plug the vite dev runtime into it correctly. Such as running wrangler pages dev at port 4173 and vite on 5173
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
when I run bunx wrangler pages dev it only runs what is built and/or doesn't show any logs from Vite's dev runtime.
8 replies
CDCloudflare Developers
Created by boggin on 10/30/2024 in #pages-help
Some help with wrangler pages dev with vite?
So far, the closest to achieving it is something like yarn wrangler pages dev --proxy 5173 --r2=testing --compatibility-flags='nodejs_compat' -- npx vite dev. There are deprecation warnings so I'd like to know the way wrangler is going with the equivalent command.
8 replies
CDCloudflare Developers
Created by boggin on 7/22/2024 in #pages-help
dep problems sveltekit cloudflare-adapter when building
Found out the problem. For future searchers: You cannot use getPlatformProxy() outside of dev (specifically can't use outside of Node environmnets per the docs), so simply use a conditional dynamic import for dev.
if(dev){
const proxy = await getPlatformProxy();
if(dev){
const proxy = await getPlatformProxy();
3 replies
CDCloudflare Developers
Created by boggin on 7/22/2024 in #pages-help
dep problems sveltekit cloudflare-adapter when building
There's also about 8 similar errors with wrangler regarding using nodemodules
3 replies
CDCloudflare Developers
Created by boggin on 1/9/2024 in #general-help
Wasm problem with Sveltekit, Cloudflare Pages and Resvg.
Thank you James!
37 replies
CDCloudflare Developers
Created by boggin on 1/9/2024 in #general-help
Wasm problem with Sveltekit, Cloudflare Pages and Resvg.
Dude that worked!!! https://github.com/kvnang/workers-og Whatever magic they did to fit these all into the work under 1MB is magical. It's working as I intended to!
37 replies
CDCloudflare Developers
Created by boggin on 1/9/2024 in #general-help
Wasm problem with Sveltekit, Cloudflare Pages and Resvg.
? for me it says it can't exceed 1MB gzipped
37 replies