REFACTOR: Remove `Discourse.Route` in lieu of importing

REFACTOR: Remove Discourse.Route in lieu of importing

diff --git a/app/assets/javascripts/discourse-common/resolver.js.es6 b/app/assets/javascripts/discourse-common/resolver.js.es6
index e1507406bb..ba272c6bf1 100644
--- a/app/assets/javascripts/discourse-common/resolver.js.es6
+++ b/app/assets/javascripts/discourse-common/resolver.js.es6
@@ -139,6 +139,11 @@ export function buildResolver(baseName) {
     },
 
     resolveRoute(parsedName) {
+      if (parsedName.fullNameWithoutType === "basic") {
+        return requirejs("discourse/routes/discourse", null, null, true)
+          .default;
+      }
+
       return this.customResolve(parsedName) || this._super(parsedName);
     },
 
diff --git a/app/assets/javascripts/discourse/models/category.js.es6 b/app/assets/javascripts/discourse/models/category.js.es6
index 1384837d33..e268330618 100644
--- a/app/assets/javascripts/discourse/models/category.js.es6
+++ b/app/assets/javascripts/discourse/models/category.js.es6
@@ -411,7 +411,7 @@ Category.reopenClass({
 Object.defineProperty(Discourse, "Category", {
   get() {
     deprecated(
-      "Import the Category object instead of using Discourse.Category",
+      "Import the Category class instead of using Discourse.Category",
       { since: "2.4.0", dropFrom: "2.5.0" }
     );
     return Category;
diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6
index c0cec002ae..f6c598d9df 100644
--- a/app/assets/javascripts/discourse/models/nav-item.js.es6
+++ b/app/assets/javascripts/discourse/models/nav-item.js.es6
@@ -259,7 +259,7 @@ export function addNavItem(item) {
 
 Object.defineProperty(Discourse, "NavItem", {
   get() {
-    deprecated("Import the NavItem object instead of using Discourse.NavItem", {
+    deprecated("Import the NavItem class instead of using Discourse.NavItem", {
       since: "2.4.0",
       dropFrom: "2.5.0"
     });
diff --git a/app/assets/javascripts/discourse/routes/discourse.js.es6 b/app/assets/javascripts/discourse/routes/discourse.js.es6
index 2329168593..980e986cd9 100644
--- a/app/assets/javascripts/discourse/routes/discourse.js.es6
+++ b/app/assets/javascripts/discourse/routes/discourse.js.es6
@@ -2,6 +2,7 @@ import { once } from "@ember/runloop";
 import Composer from "discourse/models/composer";
 import { getOwner } from "discourse-common/lib/get-owner";
 import Route from "@ember/routing/route";
+import deprecated from "discourse-common/lib/deprecated";
 
 const DiscourseRoute = Route.extend({
   showFooter: false,
@@ -107,4 +108,14 @@ const DiscourseRoute = Route.extend({
   }
 });
 
+Object.defineProperty(Discourse, "Route", {
+  get() {
+    deprecated("Import the Route class instead of using Discourse.Route", {
+      since: "2.4.0",
+      dropFrom: "2.5.0"
+    });
+    return Route;
+  }
+});
+
 export default DiscourseRoute;
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 c8dcad4970..d61cebfbf0 100644
--- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb
+++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb
@@ -86,7 +86,6 @@ JS
 
       @@whitelisted ||= Set.new(
         [
-         "discourse/routes/discourse",
          "discourse/models/site",
          "discourse/models/user",
         ]
@@ -151,11 +150,6 @@ JS
         if require_name !~ /\-test$/ && require_name !~ /^discourse\/plugins\//
           result = "#{class_name}#{type.classify}"
 
-          # HAX
-          result = "Controller" if result == "ControllerController"
-          result = "Route" if result == "DiscourseRoute"
-          result = "View" if result == "ViewView"
-
           result = result.gsub(/Mixin$/, '')
           result = result.gsub(/Model$/, '')

GitHub sha: 920f8c6d