From fbf92a2212fcf187d981cf62f7bc40724f44d340 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 5 Oct 2023 02:06:58 +0200 Subject: [PATCH] DEV: Build theme transpiler in custom envs (#23785) (i.e. non-production, non-test, non-development environments :P like `RAILS_ENV="profile"`) --- lib/discourse_js_processor.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb index a70361325a4..0526b0845e3 100644 --- a/lib/discourse_js_processor.rb +++ b/lib/discourse_js_processor.rb @@ -134,9 +134,7 @@ class DiscourseJsProcessor ctx.attach("rails.logger.error", proc { |err| Rails.logger.error(err.to_s) }) # Theme template AST transformation plugins - if Rails.env.development? || Rails.env.test? - @processor_mutex.synchronize { build_theme_transpiler } - end + @processor_mutex.synchronize { build_theme_transpiler } if !Rails.env.production? ctx.eval(File.read(TRANSPILER_PATH), filename: "theme-transpiler.js")