svend
CDCloudflare Developers
•Created by Silvan on 3/24/2025 in #workers-and-pages-discussions
.dev.vars end up in server bundle
.dev.vars is also present in server folder with cloudflare/vite-plugin v0.1.15 used and react-router v.7.
Wrangler (as of v4.4) does complain that there is no environment found in the redirected wrangler.json though. (build/server/wrangler.json) - maybe it is including .dev.vars as fallback in these cases? Ref https://github.com/cloudflare/workers-sdk/commit/1987a79d43158ebc6eeb54b2102214060266b6d7
Would prefer .dev.vars to <not go anywhere near the server build 😉
2 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
Will just steal this thread to follow up on the "deploy" command and use of cloudflare-vite plugin 🙈
It seems wrangler now:
- appends to worker name on its own initiative and doing it twice, also including CLOUDFLARE_ENV?
- Goes into build/server and finds wrangler.json without any reference to it in my config files? Can find it in .wrangler/deploy/config.json, but not sure where that file comes from. Vite plugin perhaps?
Is this also documented somewhere?
Edit: appending is mentioned here, but not the twice part:
https://github.com/cloudflare/workers-sdk/tree/main/packages/vite-plugin-cloudflare#cloudflare-environments
Example 1 gives worker name workername-production:
Example 2 gives worker name workername-production-production...:
Deploy command is:
Wrangler 4.4, @cloudflare/vite-plugin: 0.1.15
Warning during deploy:
15 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
If that’s something you’re rolling out just now - for context, this issue has been ongoing for days ☺️
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
At AWS this would have taken days if not weeks
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
Seriously? Colour me impressed
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
account: 7746a34790ac816eb849a4aace8c00e9
zone:
d8a547dfc8d9adede4d0a61cef7294c7
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)
@Walshy | Workers/Pages any input on where to officially report these things? Similar posts are also found on the Cloudflare community forum.
22 replies
CDCloudflare Developers
•Created by svend on 1/22/2025 in #workers-help
Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)

22 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?
Another "good enough" solution would be to start using the _headers file support in CF Pages also for Worker Assets: https://developers.cloudflare.com/pages/configuration/headers/
21 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?

21 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?

21 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?
Yes thought about it, and not going down that road 😹
Not sure I am able to bring my point across here - but the way I understand it, the current ETag mechanism only works because the browser chose to save a copy of the assets on its own initiative after the first request to the site - even if the Cache-Control header told the browser to not cache the asset.
I have no control of how long that cache is kept - could be until next browser restart, 5 minutes - who knows?
21 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?
Thanks for the quick reply! Good to hear that you are caching the assets (on the edge I assume), but it would be even better if there is a mechanism to tell the browser to cache the assets. Relying on the browser incidentally still having the file in-memory to use ETags seems.. iffy?
In my case, all static assets are content hashed / fingerprinted.
21 replies