From 6e481851e70b5dcb17f701e6fd9bac8eb99933e3 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 12 Nov 2019 10:21:25 -0500 Subject: [PATCH] REFACTOR: Don't generate `Discourse` constants for mixins --- .../tilt/es6_module_transpiler_template.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 d61cebfbf0a..6ce0c88f992 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -91,7 +91,7 @@ JS ] ) - @@whitelisted.include?(path) || path =~ /discourse\/mixins/ + @@whitelisted.include?(path) end def babel_transpile(source) @@ -150,7 +150,6 @@ JS if require_name !~ /\-test$/ && require_name !~ /^discourse\/plugins\// result = "#{class_name}#{type.classify}" - result = result.gsub(/Mixin$/, '') result = result.gsub(/Model$/, '') if result != "PostMenuView"