-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: remove ClientOnly children from server build #6193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds server-side detection and transformation for ClientOnly JSX, a new client-only demo route/component with E2E tests, and integrates JSX candidate collection and handling into the server-fn compiler pipeline. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant S as Source (TSX files)
participant C as ServerFnCompiler
participant H as handleClientOnlyJSX
participant R as Server Renderer
participant B as Browser (Client)
Note over S,C: Build / compile time
S->>C: Parse AST, detect ClientOnly imports and JSX usage
C->>H: Send matching JSXElement node(s) (server env)
H-->>C: Return transformed JSX (children removed, self-closing)
C-->>R: Emit server-safe code / HTML with preserved fallbacks
Note over R,B: Runtime / hydration
R->>B: Send server-rendered HTML (fallback placeholders)
B->>B: Hydration loads client bundles
B->>B: Client-only components mount and render (e.g., WindowSize)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
Comment |
|
View your CI Pipeline Execution ↗ for commit c4faeee
☁️ Nx Cloud last updated this comment at |
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.