File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -362,13 +362,13 @@ def load_pack_for_generated_component(react_component_name, render_options)
362
362
363
363
ReactOnRails ::PackerUtils . raise_nested_entries_disabled unless ReactOnRails ::PackerUtils . nested_entries?
364
364
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 } " )
372
372
end
373
373
374
374
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
You can’t perform that action at this time.
0 commit comments