mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FIX: Plugins should be required by the path we generate for them
This commit is contained in:
@ -77,7 +77,8 @@ module Tilt
|
||||
if file_name.end_with?('s') && (!class_name.end_with?('s'))
|
||||
class_name << "s"
|
||||
end
|
||||
@output << "\n\nDiscourse.#{class_name}#{type.classify} = require('#{scope.logical_path}').default"
|
||||
require_name = module_name(scope.root_path, scope.logical_path)
|
||||
@output << "\n\nDiscourse.#{class_name}#{type.classify} = require('#{require_name}').default"
|
||||
end
|
||||
|
||||
@output
|
||||
|
Reference in New Issue
Block a user