Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed ability to override storefront Stimulus controllers (#13180)

Damian Legawiec2ea7461a8f4f
diff --git a/storefront/app/views/spree/shared/_head.html.erb b/storefront/app/views/spree/shared/_head.html.erb
index 64a7d508e0..6770e0e22e 100644
--- a/storefront/app/views/spree/shared/_head.html.erb
+++ b/storefront/app/views/spree/shared/_head.html.erb
@@ -16,9 +16,11 @@
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" data-turbo-track="reload"></script>
-<%= javascript_importmap_tags "application-spree-storefront" %>
<% if Rails.application.importmap.packages["application"].present? %>
- <%= javascript_import_module_tag "application" %>
+ <%= javascript_importmap_tags "application" %>
+ <%= javascript_import_module_tag "application-spree-storefront" %>
+<% else %>
+ <%= javascript_importmap_tags "application-spree-storefront" %>
<% end %>
<%= javascript_tag "wishedVariantIds = #{(current_wishlist&.variant_ids&.map(&:to_s) || []).to_json.html_safe};" %>