DEV: Build theme transpiler in custom envs (#23785)

(i.e. non-production, non-test, non-development environments :P like `RAILS_ENV="profile"`)
This commit is contained in:
Jarek Radosz 2023-10-05 02:06:58 +02:00 committed by GitHub
parent 3ee8678cf1
commit fbf92a2212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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")