From 44ee7587c0b80e29b6ca59bab1de126ba1b5d636 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 9 Jun 2014 15:22:11 -0400 Subject: [PATCH] FIX: Plugins should be required by the path we generate for them --- .../tilt/es6_module_transpiler_template.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb index 7103e412665..8e558ea2ca0 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -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