-
-
Notifications
You must be signed in to change notification settings - Fork 637
Use RSC payload to render server components on server #1696
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
base: master
Are you sure you want to change the base?
Changes from all commits
b63596a
d9eec0d
f659285
bec4fc8
08fd7cf
9e962c3
6f27f4a
33c1db2
0d32623
6f6c8ab
874eac4
ec35ccb
be6469f
1483b40
14bf1ba
377be74
aecebd7
ca4dbba
a9540e2
4a9d7a0
74b0c11
6765eae
44d3758
db9d080
4709047
7d2b0d9
4214a6e
bec40aa
f65e96a
564d1eb
e43fd8d
6b2f6a2
6a82137
680f01b
7b2e1f1
5f48cc7
b9954a2
8345920
f428d6b
9cd81f9
ead4a00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ def self.configure | |
|
||
DEFAULT_GENERATED_ASSETS_DIR = File.join(%w[public webpack], Rails.env).freeze | ||
DEFAULT_REACT_CLIENT_MANIFEST_FILE = "react-client-manifest.json" | ||
DEFAULT_REACT_SERVER_CLIENT_MANIFEST_FILE = "react-server-client-manifest.json" | ||
DEFAULT_COMPONENT_REGISTRY_TIMEOUT = 5000 | ||
|
||
def self.configuration | ||
|
@@ -21,6 +22,7 @@ def self.configuration | |
server_bundle_js_file: "", | ||
rsc_bundle_js_file: "", | ||
react_client_manifest_file: DEFAULT_REACT_CLIENT_MANIFEST_FILE, | ||
react_server_client_manifest_file: DEFAULT_REACT_SERVER_CLIENT_MANIFEST_FILE, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any changes to configuration should have matching documentation changes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see any changes to configuration.md There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Judahmeek please check again. I merged the PR that contains the changes into this PR. |
||
prerender: false, | ||
auto_load_bundle: false, | ||
replay_console: true, | ||
|
@@ -66,7 +68,7 @@ class Configuration | |
:same_bundle_for_client_and_server, :rendering_props_extension, | ||
:make_generated_server_bundle_the_entrypoint, | ||
:generated_component_packs_loading_strategy, :force_load, :rsc_bundle_js_file, | ||
:react_client_manifest_file, :component_registry_timeout | ||
:react_client_manifest_file, :react_server_client_manifest_file, :component_registry_timeout | ||
|
||
# rubocop:disable Metrics/AbcSize | ||
def initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender: nil, | ||
|
@@ -82,7 +84,8 @@ def initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender | |
i18n_dir: nil, i18n_yml_dir: nil, i18n_output_format: nil, i18n_yml_safe_load_options: nil, | ||
random_dom_id: nil, server_render_method: nil, rendering_props_extension: nil, | ||
components_subdirectory: nil, auto_load_bundle: nil, force_load: nil, | ||
rsc_bundle_js_file: nil, react_client_manifest_file: nil, component_registry_timeout: nil) | ||
rsc_bundle_js_file: nil, react_client_manifest_file: nil, react_server_client_manifest_file: nil, | ||
component_registry_timeout: nil) | ||
self.node_modules_location = node_modules_location.present? ? node_modules_location : Rails.root | ||
self.generated_assets_dirs = generated_assets_dirs | ||
self.generated_assets_dir = generated_assets_dir | ||
|
@@ -112,6 +115,7 @@ def initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender | |
self.server_bundle_js_file = server_bundle_js_file | ||
self.rsc_bundle_js_file = rsc_bundle_js_file | ||
self.react_client_manifest_file = react_client_manifest_file | ||
self.react_server_client_manifest_file = react_server_client_manifest_file | ||
self.same_bundle_for_client_and_server = same_bundle_for_client_and_server | ||
self.server_renderer_pool_size = self.development_mode ? 1 : server_renderer_pool_size | ||
self.server_renderer_timeout = server_renderer_timeout # seconds | ||
|
@@ -305,7 +309,8 @@ def ensure_webpack_generated_files_exists | |
"manifest.json", | ||
server_bundle_js_file, | ||
rsc_bundle_js_file, | ||
react_client_manifest_file | ||
react_client_manifest_file, | ||
react_server_client_manifest_file | ||
].compact_blank | ||
end | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.