From e2cb8dc0b1146e78a153036410e82a97a76883bf Mon Sep 17 00:00:00 2001 From: Paul Bob Date: Thu, 30 Jan 2025 21:44:44 +0200 Subject: [PATCH] fix: `late-registration` javascript tag --- .../avo/asset_manager/javascript_component.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 %>