Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare worker environment not available in loader. #3848

Open
Nipsuli opened this issue Mar 24, 2025 · 0 comments
Open

Cloudflare worker environment not available in loader. #3848

Nipsuli opened this issue Mar 24, 2025 · 0 comments

Comments

@Nipsuli
Copy link

Nipsuli commented Mar 24, 2025

Which project does this relate to?

Start

Describe the bug

If I call the getEvent from vinxi in server function the cloudflare context is there depending on the context the server function is called.

In case the server function is called from client e.g. in click handler the cloudflare context is there. And in case the server function is called in loader the context is not there.

Your Example Website or App

https://tanstack-start-cloudflare-worker.tgec.workers.dev/

The code: https://github.com/Nipsuli/tanstack-start-cloudflare-worker

Steps to Reproduce the Bug or Issue

  1. Go to https://tanstack-start-cloudflare-worker.tgec.workers.dev/
  2. open console
  3. click the button
  4. observe the server side data being empty and the client side data having the environment

Expected behavior

As a user I'd expect both the server side and client side calls to have same context.

Screenshots or Videos

Image

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant