Skip to content

Conversation

@TadejPolajnar
Copy link

@TadejPolajnar TadejPolajnar commented Jan 24, 2026

PR updates the Paraglide example documentation to clarify server entrypoint requirements for edge runtime deployments.

Changes:

  • Added explanatory note about when server.ts needs to be updated for edge runtimes
  • Documented that paraglideMiddleware prevents locale redirect bugs (e.g., /de/en)

Issue was also mention here, but never properly documented. #6268

Summary by CodeRabbit

  • Documentation
    • Added edge-runtime deployment guidance for Paraglide with Cloudflare Workers configuration and server entrypoint considerations.
    • Added comprehensive Vite integration setup with Paraglide plugin configuration, including locale strategy, URL patterns, and cookie settings.
    • Added URL rewrite examples demonstrating locale handling in router configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

Documentation updates to the Paraglide React i18n example's README, covering edge-runtime deployment guidance for Cloudflare Workers, Vite plugin configuration with localization settings, server entrypoint considerations for non-Node environments, and URL rewrite integration examples.

Changes

Cohort / File(s) Summary
Documentation updates
examples/react/start-i18n-paraglide/README.md
Added edge-runtime deployment guidance (Cloudflare Workers), Paraglide Vite plugin configuration details, server entrypoint notes for non-Node environments, and URL rewrite integration examples

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

documentation

Poem

🐰 A README blooms with wisdom bright,
Paraglide paths now guide the light,
Edge runtimes dance with Cloudflare's grace,
i18n finds its rightful place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: documentation clarification about server.ts entrypoint updates for edge runtimes, which directly matches the PR's primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@examples/react/start-i18n-paraglide/README.md`:
- Around line 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.

Comment on lines +91 to +96
**Cloudflare Workers (`wrangler.toml`):**
```jsonc
{
"main": "./src/server.ts" // Instead of "main": "@tanstack/react-start/
}
```
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants