Skip to content

A platform for community discussion. Free, open, simple.

REFACTOR: Don't generate `Discourse` constants for mixins

Robin Ward6e481851e70b
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"