Commit 5ee7b1f
committed
fix(tanstackstart-react): Add workerd and worker export conditions
Add `workerd` and `worker` export conditions to the `.` entry in
package.json, pointing to `index.server.js`. This prevents the
Cloudflare Vite plugin's resolve conditions (`workerd`, `worker`,
`module`, `browser`) from falling through to the `browser` condition,
which would resolve to `index.client.js` and trigger TanStack Start's
import-protection plugin rejecting `*.client.*` files in the server
environment.
Users deploying to Cloudflare Workers will need `nodejs_compat` enabled
in their wrangler configuration.
A dedicated Cloudflare entrypoint (without `@sentry/node` dependency)
will be addressed in a follow-up PR.1 parent 60969fc commit 5ee7b1f
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
0 commit comments