mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 06:43:37 +08:00
bc4c40abd4
- Refactor source_url to avoid using eval in development - Precompile handlebars in development - Include template compilers when running qunit - Remove unsafe-eval in development CSP - Include unsafe-eval only for qunit routes in development
13 lines
312 B
Ruby
13 lines
312 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'discourse_iife'
|
|
|
|
Rails.application.config.assets.configure do |env|
|
|
env.register_preprocessor('application/javascript', DiscourseIIFE)
|
|
|
|
unless Rails.env.production?
|
|
require 'source_url'
|
|
env.register_postprocessor('application/javascript', SourceURL)
|
|
end
|
|
end
|