Skip to content

Commit 3a61c0c

Browse files
revert commiting some lines
1 parent d9d9cf4 commit 3a61c0c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/react_on_rails/helper.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,13 @@ def load_pack_for_generated_component(react_component_name, render_options)
362362

363363
ReactOnRails::PackerUtils.raise_nested_entries_disabled unless ReactOnRails::PackerUtils.nested_entries?
364364
append_javascript_pack_tag("client-bundle")
365-
# if Rails.env.development?
366-
# is_component_pack_present = File.exist?(generated_components_pack_path(react_component_name))
367-
# raise_missing_autoloaded_bundle(react_component_name) unless is_component_pack_present
368-
# end
369-
# append_javascript_pack_tag("generated/#{react_component_name}",
370-
# defer: ReactOnRails.configuration.defer_generated_component_packs)
371-
# append_stylesheet_pack_tag("generated/#{react_component_name}")
365+
if Rails.env.development?
366+
is_component_pack_present = File.exist?(generated_components_pack_path(react_component_name))
367+
raise_missing_autoloaded_bundle(react_component_name) unless is_component_pack_present
368+
end
369+
append_javascript_pack_tag("generated/#{react_component_name}",
370+
defer: ReactOnRails.configuration.defer_generated_component_packs)
371+
append_stylesheet_pack_tag("generated/#{react_component_name}")
372372
end
373373

374374
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity

0 commit comments

Comments
 (0)