Wonky Onion
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
you should use CLOUDFLARE_ENV with vite build to set the environment for deploy (like you're already doing), and then you don't need
wrangler deploy --env
. that's probably why you're getting the double appending (because vite resolves the environment once, and then wrangler tries to do it again).
tldr vite build --mode production && wrangler deploy
should ensure you have the right environment.15 replies
CDCloudflare Developers
•Created by Silvan on 3/24/2025 in #workers-and-pages-discussions
.dev.vars end up in server bundle
https://github.com/cloudflare/workers-sdk/tree/main/packages/vite-plugin-cloudflare#secrets the vite plugin does that, but its just for previews - its not going to be deployed with your worker
2 replies
CDCloudflare Developers
•Created by Amos on 10/14/2024 in #wrangler
I don't think it was the blog one, but
if you change the wrangler.toml to have main = "./dist/_worker.js/index.js` it should work now
1 replies
CDCloudflare Developers
•Created by stridex on 9/27/2024 in #workers-and-pages-discussions
adding assets to workers is sick and i'
glad you're liking workers assets though :D
3 replies
CDCloudflare Developers
•Created by stridex on 9/27/2024 in #workers-and-pages-discussions
adding assets to workers is sick and i'
yup, you have to use the ASSETS binding to access
not_found_handling
behaviour from your worker (exactly like you've done) - there's a snippet here in the docs that shows it: https://developers.cloudflare.com/workers/static-assets/binding/#runtime-api-reference
We should probably add it to the not_found_handling
section too...3 replies