Skip to content

Commit b770daa

Browse files
ihabadhamclaude
andcommitted
Add RSC watcher to Procfile.dev and nav link to /server-components
- Procfile.dev: wp-rsc process runs RSC_BUNDLE_ONLY=yes bin/shakapacker --watch alongside existing client, server, and renderer processes. - paths.js: SERVER_COMPONENTS_PATH constant. - NavigationBar.jsx: "RSC Demo" link in the nav bar. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 02b8b1c commit b770daa

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

Procfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ rails: bundle exec thrust bin/rails server -p 3000
1212
wp-client: RAILS_ENV=development NODE_ENV=development bin/shakapacker-dev-server
1313
# Server webpack watcher for SSR bundle
1414
wp-server: SERVER_BUNDLE_ONLY=yes bin/shakapacker --watch
15+
# RSC webpack watcher for React Server Components bundle
16+
wp-rsc: RSC_BUNDLE_ONLY=yes bin/shakapacker --watch
1517
node-renderer: NODE_ENV=development node renderer/node-renderer.js

client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ function NavigationBar(props) {
102102
Rescript
103103
</a>
104104
</li>
105+
<li>
106+
<a
107+
className={navItemClassName(pathname === paths.SERVER_COMPONENTS_PATH)}
108+
href={paths.SERVER_COMPONENTS_PATH}
109+
>
110+
RSC Demo
111+
</a>
112+
</li>
105113
<li>
106114
<a
107115
className={navItemClassName(false)}

client/app/bundles/comments/constants/paths.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export const RESCRIPT_PATH = '/rescript';
55
export const SIMPLE_REACT_PATH = '/simple';
66
export const STIMULUS_PATH = '/stimulus';
77
export const RAILS_PATH = '/comments';
8+
export const SERVER_COMPONENTS_PATH = '/server-components';

0 commit comments

Comments
 (0)