Skip to content

Commit 24349c2

Browse files
justin808claude
andcommitted
Remove unnecessary using_packer? check since Shakapacker is required
- Since gemspec requires Shakapacker, the using_packer? check is redundant - Simplifies bundle_js_file_path logic by removing unnecessary condition - Inverts condition structure for better readability per RuboCop - Maintains exact same functionality with cleaner code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent edb7243 commit 24349c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/react_on_rails/utils.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ def self.bundle_js_file_path(bundle_name)
7272
# Priority order depends on bundle type:
7373
# SERVER BUNDLES (normal case): Try secure non-public locations first, then manifest, then legacy
7474
# CLIENT BUNDLES (normal case): Try manifest first, then fallback locations
75-
if ReactOnRails::PackerUtils.using_packer? && bundle_name != "manifest.json"
76-
bundle_js_file_path_with_packer(bundle_name)
77-
else
75+
if bundle_name == "manifest.json"
7876
# Default to the non-hashed name in the specified output directory, which, for legacy
7977
# React on Rails, this is the output directory picked up by the asset pipeline.
8078
# For Shakapacker, this is the public output path defined in the (shaka/web)packer.yml file.
8179
File.join(generated_assets_full_path, bundle_name)
80+
else
81+
bundle_js_file_path_with_packer(bundle_name)
8282
end
8383
end
8484

0 commit comments

Comments
 (0)