Skip to content

Commit 8c32a63

Browse files
justin808claude
andcommitted
Simplify dynamic constant resolution to direct Shakapacker usage
Replace Object.const_get(ReactOnRails::PackerUtils.packer_type.capitalize) with direct Shakapacker::Manifest::MissingEntryError since we only support Shakapacker now. This removes unnecessary complexity and improves code clarity. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2422ecc commit 8c32a63

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/react_on_rails/utils.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def self.bundle_js_file_path(bundle_name)
9494
if ReactOnRails::PackerUtils.using_packer? && bundle_name != "manifest.json"
9595
begin
9696
ReactOnRails::PackerUtils.bundle_js_uri_from_packer(bundle_name)
97-
rescue Object.const_get(
98-
ReactOnRails::PackerUtils.packer_type.capitalize
99-
)::Manifest::MissingEntryError
97+
rescue Shakapacker::Manifest::MissingEntryError
10098
handle_missing_manifest_entry(bundle_name)
10199
end
102100
else

0 commit comments

Comments
 (0)