DEV: Move pretty-text into vendor and use that (#13273)

DEV: Move pretty-text into vendor and use that (#13273)

In Ember CLI addons get put into the vendor bundle, as opposed to their own bundle like we’re doing in the Rails app. We never use pretty-text without our vendor bundle so this should have no difference on performance.

We need to keep the pretty-text bundle for server side cooking.

diff --git a/app/assets/javascripts/discourse/tests/test_helper.js b/app/assets/javascripts/discourse/tests/test_helper.js
index 9da07da..028f3a5 100644
--- a/app/assets/javascripts/discourse/tests/test_helper.js
+++ b/app/assets/javascripts/discourse/tests/test_helper.js
@@ -17,7 +17,6 @@
 // Our base application
 //= require vendor
 //= require discourse-shims
-//= require pretty-text-bundle
 //= require markdown-it-bundle
 //= require application
 //= require admin
diff --git a/app/assets/javascripts/vendor.js b/app/assets/javascripts/vendor.js
index 6d8299a..fbeadfd 100644
--- a/app/assets/javascripts/vendor.js
+++ b/app/assets/javascripts/vendor.js
@@ -27,3 +27,4 @@
 //= require virtual-dom-amd
 //= require intersection-observer
 //= require discourse-shims
+//= require pretty-text-bundle
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 4bb2d4c..2d9445a 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -29,7 +29,6 @@
       <%= preload_script_url ExtraLocalesController.url('overrides') %>
     <%- end %>
     <%= preload_script "vendor" %>
-    <%= preload_script "pretty-text-bundle" %>
     <%= preload_script "application" %>
     <%- Discourse.find_plugin_js_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, request: request).each do |file| %>
       <%= preload_script file %>
diff --git a/app/views/qunit/theme.html.erb b/app/views/qunit/theme.html.erb
index 5815441..c12f34a 100644
--- a/app/views/qunit/theme.html.erb
+++ b/app/views/qunit/theme.html.erb
@@ -9,7 +9,6 @@
       <%= preload_script "locales/en" %>
       <%= preload_script "vendor" %>
       <%= preload_script "discourse/tests/theme_qunit_vendor" %>
-      <%= preload_script "pretty-text-bundle" %>
       <%= preload_script "markdown-it-bundle" %>
       <%= preload_script "application" %>
       <%- Discourse.find_plugin_js_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, request: request).each do |file| %>
diff --git a/spec/requests/qunit_controller_spec.rb b/spec/requests/qunit_controller_spec.rb
index c852696..ec825e7 100644
--- a/spec/requests/qunit_controller_spec.rb
+++ b/spec/requests/qunit_controller_spec.rb
@@ -100,7 +100,6 @@ describe QunitController do
         expect(response.body).to include("/assets/locales/en.js")
         expect(response.body).to include("/assets/vendor.js")
         expect(response.body).to include("/assets/discourse/tests/theme_qunit_vendor.js")
-        expect(response.body).to include("/assets/pretty-text-bundle.js")
         expect(response.body).to include("/assets/markdown-it-bundle.js")
         expect(response.body).to include("/assets/application.js")
         expect(response.body).to include("/assets/admin.js")

GitHub sha: 5d2b836a