You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/configuration.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,31 @@ ReactOnRails.configure do |config|
104
104
# you should include a name that matches your bundle name in your Webpack config.
105
105
config.server_bundle_js_file = "server-bundle.js"
106
106
107
+
# When using React on Rails Pro with RSC support enabled, these configuration options work together:
108
+
#
109
+
# 1. In RORP, set `config.enable_rsc_support = true` in your react_on_rails_pro.rb initializer
110
+
#
111
+
# 2. The `rsc_bundle_js_file` (typically "rsc-bundle.js") contains only server components and
112
+
# references to client components. It's generated using the RSC Webpack Loader which transforms
113
+
# client components into references. This bundle is specifically used for generating RSC payloads
114
+
# and is configured with the `react-server` condition.
115
+
config.rsc_bundle_js_file = "rsc-bundle.js"
116
+
#
117
+
# 3. The `react_client_manifest_file` contains mappings for client components that need hydration.
118
+
# It's generated by the React Server Components Webpack plugin and is required for client-side
119
+
# hydration of components.
120
+
# This manifest file is automatically generated by the React Server Components Webpack plugin. Only set this if you've configured the plugin to use a different filename.
# 4. The `react_server_client_manifest_file` is used during server-side rendering with RSC to
124
+
# properly resolve references between server and client components.
125
+
#
126
+
# These files are crucial when implementing React Server Components with streaming, which offers
127
+
# benefits like reduced JavaScript bundle sizes, faster page loading, and selective hydration
128
+
# of client components.
129
+
# This manifest file is automatically generated by the React Server Components Webpack plugin. Only set this if you've configured the plugin to use a different filename.
0 commit comments