From 69912f183117b7e00ba6ee685523bbea317464c5 Mon Sep 17 00:00:00 2001 From: TadejPolajnar Date: Sun, 25 Jan 2026 02:59:15 +0800 Subject: [PATCH 1/2] docs(examples): clarify server.ts entrypoint updates for edge runtimes --- examples/react/start-i18n-paraglide/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/react/start-i18n-paraglide/README.md b/examples/react/start-i18n-paraglide/README.md index 7f481e133c7..421c2390ef6 100644 --- a/examples/react/start-i18n-paraglide/README.md +++ b/examples/react/start-i18n-paraglide/README.md @@ -86,6 +86,8 @@ export default { } ``` +> **Important**: A custom `server.ts` entry point is required for Paraglide to work correctly. It handles locale detection from URLs, server-side rendering context. See the [Server Entry Point documentation](https://tanstack.com/start/latest/docs/framework/react/guide/server-entry-point) for setup instructions on different platforms, including Cloudflare Workers. + In `__root.tsx` change the html lang attribute to the current locale. ```tsx From c8e3fdf2e9a43d1117aba0a5686baaa5eb4acb67 Mon Sep 17 00:00:00 2001 From: TadejPolajnar Date: Sun, 25 Jan 2026 12:37:06 +0800 Subject: [PATCH 2/2] docs(start): explain how to configure custom server entry point for edge runtimes --- .../framework/react/guide/server-entry-point.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/start/framework/react/guide/server-entry-point.md b/docs/start/framework/react/guide/server-entry-point.md index a07014947e2..e1f428754d0 100644 --- a/docs/start/framework/react/guide/server-entry-point.md +++ b/docs/start/framework/react/guide/server-entry-point.md @@ -100,3 +100,19 @@ The server entry point is where you can configure server-specific behavior: - Logging and monitoring This flexibility allows you to customize how your TanStack Start application handles server-side rendering while maintaining the framework's conventions. + +## Configuring the Server Entry Point + +When deploying to platforms like Cloudflare Workers or other edge runtimes, you need to configure where your custom server entry point is located. + +### Cloudflare Workers + +Update your `wrangler.jsonc` to point to your custom server entry point: + +```jsonc +{ + "main": "./src/server.ts" +} +``` + +This tells Cloudflare Workers to use your custom `src/server.ts` file as the entry point instead of the default TanStack Start handler. It is essential when you need custom middleware, authentication, or other server-side logic (such as i18n middleware for locale handling).