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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fix admin Tailwind CSS not scanning engine views
Damian Legawiec190ef06b856f
diff --git a/backend/engines/admin/lib/spree/admin/tailwind_helper.rb b/backend/engines/admin/lib/spree/admin/tailwind_helper.rbindex 9be68aec65..8fd34a3eb7 100644--- a/backend/engines/admin/lib/spree/admin/tailwind_helper.rb+++ b/backend/engines/admin/lib/spree/admin/tailwind_helper.rb@@ -22,6 +22,16 @@ module Spreecss = File.read(input_path)css = css.gsub("$SPREE_ADMIN_PATH", Spree::Admin::Engine.root.to_s)css = css.gsub("/* $SPREE_ENGINE_SOURCES */", spree_engine_sources)++ # Resolve relative @source paths to absolute paths since the resolved+ # CSS is written to tmp/ which changes the relative path base+ source_base = input_path.dirname+ css = css.gsub(%r{@source\s+"(\.\./[^"]+)"}) do |_match|+ relative = Regexp.last_match(1)+ absolute = File.expand_path(relative, source_base)+ %(@source "#{absolute}")+ end+cssend@@ -33,7 +43,7 @@ module Spreedef spree_enginesRails::Engine.subclasses.select do |engine|- engine.name&.start_with?("Spree::") && engine != Spree::Admin::Engine+ engine.name&.start_with?("Spree::")endend