diff --git a/app/assets/javascripts/discourse.js.es6 b/app/assets/javascripts/discourse.js similarity index 100% rename from app/assets/javascripts/discourse.js.es6 rename to app/assets/javascripts/discourse.js diff --git a/app/assets/javascripts/preload-application-data.js.es6 b/app/assets/javascripts/preload-application-data.js similarity index 87% rename from app/assets/javascripts/preload-application-data.js.es6 rename to app/assets/javascripts/preload-application-data.js index 6c3852f5cac..c72d4a66d1f 100644 --- a/app/assets/javascripts/preload-application-data.js.es6 +++ b/app/assets/javascripts/preload-application-data.js @@ -1,11 +1,11 @@ // discourse-skip-module (function() { - var ps = require("preload-store").default; - var preloadedDataElement = document.getElementById("data-preloaded"); - var setupData = document.getElementById("data-discourse-setup").dataset; + const ps = require("preload-store").default; + const preloadedDataElement = document.getElementById("data-preloaded"); + const setupData = document.getElementById("data-discourse-setup").dataset; if (preloadedDataElement) { - var preloaded = JSON.parse(preloadedDataElement.dataset.preloaded); + const preloaded = JSON.parse(preloadedDataElement.dataset.preloaded); Object.keys(preloaded).forEach(function(key) { ps.store(key, JSON.parse(preloaded[key])); @@ -34,7 +34,7 @@ Discourse.start(); Discourse.set("assetVersion", setupData.assetVersion); - let Session = require("discourse/models/session").default; + const Session = require("discourse/models/session").default; Session.currentProp( "disableCustomCSS", setupData.disableCustomCss === "true" diff --git a/app/assets/javascripts/preload-store.js.es6 b/app/assets/javascripts/preload-store.js similarity index 100% rename from app/assets/javascripts/preload-store.js.es6 rename to app/assets/javascripts/preload-store.js diff --git a/app/assets/javascripts/wizard-start.js b/app/assets/javascripts/wizard-start.js index 79c022f6fc3..4fee8d2fedf 100644 --- a/app/assets/javascripts/wizard-start.js +++ b/app/assets/javascripts/wizard-start.js @@ -1,5 +1,5 @@ // discourse-skip-module (function() { - var wizard = require("wizard/wizard").default.create(); + const wizard = require("wizard/wizard").default.create(); wizard.start(); })(); diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb index 5d41d23bb7b..3e101328cf6 100644 --- a/lib/discourse_js_processor.rb +++ b/lib/discourse_js_processor.rb @@ -42,7 +42,12 @@ class DiscourseJsProcessor relative_path.start_with?("app/assets/javascripts/select-kit/") || relative_path.start_with?("app/assets/javascripts/wizard/") || relative_path.start_with?("app/assets/javascripts/discourse-common/") || - relative_path.start_with?("app/assets/javascripts/ember-addons/") + relative_path.start_with?("app/assets/javascripts/ember-addons/") || + relative_path == "app/assets/javascripts/preload-store.js" || + relative_path == "app/assets/javascripts/preload-application-data.js" || + relative_path == "app/assets/javascripts/wizard-start.js" || + relative_path == "app/assets/javascripts/onpopstate-handler.js" || + relative_path == "app/assets/javascripts/discourse.js" end def self.skip_module?(data)