Commit 2f26987
Fix React 19 server bundle errors by removing 'use client' from .server.tsx files
Files ending with .server.tsx are intended for server-side rendering and should
not have the 'use client' directive. This directive causes webpack to bundle
these files as client components, which leads to errors when React 19's server
exports don't include client-only APIs like createContext, useContext, and
Component.
This fixes CI errors:
- export 'createContext' was not found in 'react'
- export 'useContext' was not found in 'react'
- export 'Component' was not found in 'react'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent cb444c4 commit 2f26987
File tree
3 files changed
+0
-6
lines changed- react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components
3 files changed
+0
-6
lines changedLines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ServerComponentRouter.server.tsx
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
0 commit comments