Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/react/start-i18n-paraglide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ export default {
}
```

For edge runtime deployments (Cloudflare Workers, Deno, etc.), update your deployment config:

**Cloudflare Workers (`wrangler.toml`):**
```jsonc
{
"main": "./src/server.ts" // Instead of "main": "@tanstack/react-start/
}
```
Comment on lines +91 to +96
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Incorrect file format: wrangler.toml requires TOML syntax, not JSON.

The code block shows JSON syntax, but wrangler.toml is a TOML configuration file. This will cause syntax errors during deployment.

📝 Proposed fix with correct TOML syntax
-**Cloudflare Workers (`wrangler.toml`):**
-```jsonc
-{
-  "main": "./src/server.ts" // Instead of "main": "@tanstack/react-start/
-}
-```
+**Cloudflare Workers (`wrangler.toml`):**
+```toml
+# Instead of the default TanStack Start server entry
+main = "./src/server.ts"
+```
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Cloudflare Workers (`wrangler.toml`):**
```jsonc
{
"main": "./src/server.ts" // Instead of "main": "@tanstack/react-start/
}
```
**Cloudflare Workers (`wrangler.toml`):**
🤖 Prompt for AI Agents
In `@examples/react/start-i18n-paraglide/README.md` around lines 91 - 96, The
README shows a JSON code block for wrangler.toml which is invalid; replace the
JSON block with a TOML code block and use TOML comment syntax, e.g., change the
block labelled **Cloudflare Workers (`wrangler.toml`)** to use ```toml``` and
set the entry as main = "./src/server.ts" with comments prefixed by # (not //)
so the file is valid TOML for Wrangler.


> **Note**: When using `server.ts`, you need to update the server entrypoint for edge runtimes like Cloudflare Workers, Deno, or other non-Node.js environments. The `paraglideMiddleware` handles locale detection from URLs, server-side rendering context, and prevents locale redirect bugs (e.g., `/de` → `/en`). For standard Node.js deployments, TanStack Start's default handler may work without customization.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no the default entry point never works with paraglide. you always need server.ts entry point. we should just link to the server entry point doc page and there explain how to use it in cloudflare


In `__root.tsx` change the html lang attribute to the current locale.

```tsx
Expand Down