diff --git a/app/components/avo/asset_manager/javascript_component.html.erb b/app/components/avo/asset_manager/javascript_component.html.erb index 41439d7d3..d922f82ef 100644 --- a/app/components/avo/asset_manager/javascript_component.html.erb +++ b/app/components/avo/asset_manager/javascript_component.html.erb @@ -8,4 +8,8 @@ <% end %> <%# This is the last script to run so it can register custom StimulusJS controllers from plugins. %> -<%= javascript_include_tag 'late-registration', "data-turbo-track": "reload", defer: true %> +<% if Avo::PACKED %> + <%= javascript_include_tag '/avo-assets/late-registration', "data-turbo-track": "reload", defer: true %> +<% else %> + <%= javascript_include_tag 'late-registration', "data-turbo-track": "reload", defer: true %> +<% end %>