Skip to content

Commit 9b7c076

Browse files
Enhance server bundle handling by adding support for react_server_client_manifest_file in server_bundle? method and refactoring react_server_manifest_path assignment to use bundle_js_file_path. This improves configuration flexibility and maintains consistency in bundle management.
1 parent 6fdfc08 commit 9b7c076

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/react_on_rails/utils.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def self.bundle_js_file_path(bundle_name)
112112
private_class_method def self.server_bundle?(bundle_name)
113113
config = ReactOnRails.configuration
114114
bundle_name == config.server_bundle_js_file ||
115-
bundle_name == config.rsc_bundle_js_file
115+
bundle_name == config.rsc_bundle_js_file ||
116+
bundle_name == config.react_server_client_manifest_file
116117
end
117118

118119
private_class_method def self.handle_missing_manifest_entry(bundle_name, is_server_bundle)
@@ -170,7 +171,7 @@ def self.react_server_client_manifest_file_path
170171
"react_server_client_manifest_file is nil, ensure it is set in your configuration"
171172
end
172173

173-
@react_server_manifest_path = File.join(public_bundles_full_path, asset_name)
174+
@react_server_manifest_path = bundle_js_file_path(asset_name)
174175
end
175176

176177
def self.running_on_windows?

0 commit comments

Comments
 (0)