refactor: Fetcher for tanstack start - #787
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5a9eb799c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import { | ||
| fetcher as serverFetcher, | ||
| rawFetcher as serverRawFetcher, | ||
| } from "./server"; |
There was a problem hiding this comment.
Make the server branch removable from client bundles
When this universal entry is compiled for the browser, the transformed .server(...) binding becomes unused, but packages/vitnode/package.json declares **/server.js as side-effectful, so bundlers must retain this new static ./server import. That keeps @tanstack/react-start/server-only, dotenv, and the request-only APIs in the client dependency graph and can fail any browser build importing the universal fetcher. The added test hides the problem by deleting the import itself with a regex rather than exercising the actual Vite client build; move the implementation to a tree-shakeable module or exempt this entry from the side-effect pattern.
AGENTS.md reference: AGENTS.md:L35-L36
Useful? React with 👍 / 👎.
Improving Documentation
pnpm lint:fixto fix formatting issues before opening the PR.Description
What?
Why?