File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,13 @@ def load_pack_for_generated_component(react_component_name, render_options)
361
361
return unless render_options . auto_load_bundle
362
362
363
363
ReactOnRails ::PackerUtils . raise_nested_entries_disabled unless ReactOnRails ::PackerUtils . nested_entries?
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}")
364
+ if Rails . env . development?
365
+ is_component_pack_present = File . exist? ( generated_components_pack_path ( react_component_name ) )
366
+ raise_missing_autoloaded_bundle ( react_component_name ) unless is_component_pack_present
367
+ end
368
+ append_javascript_pack_tag ( "generated/#{ react_component_name } " ,
369
+ defer : ReactOnRails . configuration . defer_generated_component_packs )
370
+ append_stylesheet_pack_tag ( "generated/#{ react_component_name } " )
372
371
end
373
372
374
373
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
You can’t perform that action at this time.
0 commit comments