Adi
Adi
CDCloudflare Developers
Created by Adi on 3/28/2025 in #workers-help
Unable to bind workers to each other locally when using @cloudflare/vite-plugin
I've been trying to do the work to move to the cloudflare vite plugin. I've got most of the way there, the only remaining issue is that I can't seem to use multiple workers together locally. My setup is - A React Router v7 app - An API worker The RR7 app already uses vite. So far I've been able to successfully use wrangler dev for the API and service bindings in the RR7 app to connect to the worker. Locally, as long as I start the api worker before the webapp, everything seems to connect just fine. However, moving to cloudflare vite plugin, when I try to connect to the worker via fetch bindings, I get this error, meaning there is something wrong with the binding.
SyntaxError: Unexpected token 'w', "[wrangler] "... is not valid JSON
SyntaxError: Unexpected token 'w', "[wrangler] "... is not valid JSON
Would really appreciate some help here. Thank you.
1 replies
CDCloudflare Developers
Created by Adi on 1/24/2024 in #pages-help
Change production branch name for pages direct deployment
Hey all, I've been deploying my pages projects using github actions (wrangler cli / wrangler action). I'm in the process of changing github repositories for the projects and as a result of this, the "default" production branch name has changed from master to main. However, when I do a deployment using wrangler pages deploy public/ it makes a preview deployment on the main branch. This makes sense since the default branch is configured to be master. Does anyone know how to change the "default" branch for a pages project? I poked around in the settings but couldn't find anything. Relevant info - account id: 87a3c637ba57424b09104e5ade4caffe
5 replies