FIX: Include plugin CSS assets when previewing themes

FIX: Include plugin CSS assets when previewing themes

diff --git a/app/controllers/themes_controller.rb b/app/controllers/themes_controller.rb
index e13f880..6520ec7 100644
--- a/app/controllers/themes_controller.rb
+++ b/app/controllers/themes_controller.rb
@@ -12,6 +12,7 @@ class ThemesController < ::ApplicationController
 
     targets = view_context.mobile_view? ? [:mobile, :mobile_theme] : [:desktop, :desktop_theme]
     targets << :admin if guardian.is_staff?
+    targets.append(*Discourse.find_plugin_css_assets(mobile_view: true, desktop_view: true))
 
     object = targets.map do |target|
       Stylesheet::Manager.stylesheet_data(target, theme_ids).map do |hash|

GitHub sha: eee20a98

1 Like