From aa2f8022479b1468a60331f185f719bb4e802b66 Mon Sep 17 00:00:00 2001 From: Sam <sam.saffron@gmail.com> Date: Tue, 1 Dec 2015 10:58:01 +1100 Subject: [PATCH] PERF: DISCOURSE_NO_CONSTANTS removed we minimize the amount of constants we decalre see: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821 --- .../tilt/es6_module_transpiler_template.rb | 2 +- 1 file changed, 1 insertion(+), 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 c920afc13..169985693 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -106,7 +106,7 @@ module Tilt # For backwards compatibility with plugins, for now export the Global format too. # We should eventually have an upgrade system for plugins to use ES6 or some other # resolve based API. - if (ENV['DISCOURSE_NO_CONSTANTS'].nil? || whitelisted?(scope.logical_path)) && + if whitelisted?(scope.logical_path) && scope.logical_path =~ /(discourse|admin)\/(controllers|components|views|routes|mixins|models)\/(.*)/ type = Regexp.last_match[2]