-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Which project does this relate to?
Start
Describe the bug
Passing context from fetch
and also from requestMiddleware
, __root.tsx
's beforeLoad
and loader
has the expected types but when dumping the parameters, it shows empty object {}
which does not match with the types.
-
Passing
fromFetch
https://github.com/eve0415/tanstack-start-issues-repro/blob/3d4fbf9db47a2f21cc3c72fb441bbcff9272babb/src/server.ts#L7 -
requestMiddleware
can seefromFetch
context
https://github.com/eve0415/tanstack-start-issues-repro/blob/3d4fbf9db47a2f21cc3c72fb441bbcff9272babb/src/start.tsx#L3-L10 -
beforeLoad
andloader
in__root.tsx
or any other routes including serve routes can see the types available but getting empty context
https://github.com/eve0415/tanstack-start-issues-repro/blob/3d4fbf9db47a2f21cc3c72fb441bbcff9272babb/src/routes/__root.tsx#L11-L19
https://github.com/eve0415/tanstack-start-issues-repro/blob/3d4fbf9db47a2f21cc3c72fb441bbcff9272babb/src/routes/__root.tsx#L25-L33
Your Example Website or App
https://github.com/eve0415/tanstack-start-issues-repro
Steps to Reproduce the Bug or Issue
pnpm install
pnpm dev
- Access the dev server to observe the log.
- Also access the files and hover the params to see the expected types
Expected behavior
The context should actually pass to the serverContext
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.132.37
- OS: any
- Browser: any
- Browser Version: any
- Bundler: vite, vite-rolldown
- Bundler Version: 7.1.7
Additional context
No response