FIX: Plugins should be required by the path we generate for them

This commit is contained in:
Robin Ward 2014-06-09 15:22:11 -04:00
parent 59ef38bb88
commit 44ee7587c0
1 changed files with 2 additions and 1 deletions

View File

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