Skip to content

Commit c27d381

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 47a4341 commit c27d381

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/react_on_rails_pro/utils.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def self.rsc_bundle_hash
6565
@rsc_bundle_hash = calc_bundle_hash(server_rsc_bundle_js_file_path)
6666
end
6767

68-
# Returns the hashed file name when using webpacker. Useful for creating cache keys.
68+
# Returns the hashed file name when using Shakapacker. Useful for creating cache keys.
6969
def self.bundle_file_name(bundle_name)
7070
# bundle_js_uri_from_packer can return a file path or a HTTP URL (for files served from the dev server)
7171
# Pathname can handle both cases
@@ -74,8 +74,8 @@ def self.bundle_file_name(bundle_name)
7474
pathname.basename.to_s
7575
end
7676

77-
# Returns the hashed file name of the server bundle when using webpacker.
78-
# Necessary fragment-caching keys.
77+
# Returns the hashed file name of the server bundle when using Shakapacker.
78+
# Necessary for fragment-caching keys.
7979
def self.server_bundle_file_name
8080
return @server_bundle_hash if @server_bundle_hash && !Rails.env.development?
8181

0 commit comments

Comments
 (0)