Skip to content

Commit d391058

Browse files
committed
Fix ReactOnRails::PackerUtils.using_packer? compatibility with react_on_rails 16.0
The using_packer? method was removed in react_on_rails 16.0 as part of the transition to Shakapacker-only support. Since Shakapacker is now assumed to always be in use, the check is no longer needed. Changes: - Remove using_packer? check from Utils.bundle_file_name method - Remove mock of non-existent method from spec - Update comments to reference Shakapacker instead of webpacker Fixes CI failures in utils_spec.rb
1 parent c85e0e3 commit d391058

File tree

1 file changed

+3
-3
lines changed
  • react_on_rails_pro/lib/react_on_rails_pro

1 file changed

+3
-3
lines changed

react_on_rails_pro/lib/react_on_rails_pro/utils.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def self.rsc_bundle_hash
108108
@rsc_bundle_hash = calc_bundle_hash(server_rsc_bundle_js_file_path)
109109
end
110110

111-
# Returns the hashed file name when using webpacker. Useful for creating cache keys.
111+
# Returns the hashed file name when using Shakapacker. Useful for creating cache keys.
112112
def self.bundle_file_name(bundle_name)
113113
# bundle_js_uri_from_packer can return a file path or a HTTP URL (for files served from the dev server)
114114
# Pathname can handle both cases
@@ -117,8 +117,8 @@ def self.bundle_file_name(bundle_name)
117117
pathname.basename.to_s
118118
end
119119

120-
# Returns the hashed file name of the server bundle when using webpacker.
121-
# Necessary fragment-caching keys.
120+
# Returns the hashed file name of the server bundle when using Shakapacker.
121+
# Necessary for fragment-caching keys.
122122
def self.server_bundle_file_name
123123
return @server_bundle_hash if @server_bundle_hash && !Rails.env.development?
124124

0 commit comments

Comments
 (0)