A platform for community discussion. Free, open, simple.
FIX: Transpile start-discourse.js to fix iOS12 support (#18149)
David Taylor564787d1dd0e
diff --git a/app/assets/javascripts/discourse/ember-cli-build.js b/app/assets/javascripts/discourse/ember-cli-build.jsindex 3913c2de123..e8784e95516 100644--- a/app/assets/javascripts/discourse/ember-cli-build.js+++ b/app/assets/javascripts/discourse/ember-cli-build.js@@ -179,11 +179,6 @@ module.exports = function (defaults) {})),applyTerser(prettyTextEngine(app)),- concat("public/assets/scripts", {- outputFile: `assets/start-discourse.js`,- headerFiles: [`start-app.js`],- inputFiles: [`discourse-boot.js`],- }),generateScriptsTree(app),applyTerser(discoursePluginsTree),]);diff --git a/app/assets/javascripts/discourse/lib/scripts.js b/app/assets/javascripts/discourse/lib/scripts.jsindex 3c4572b113c..ac73f27f4ae 100644--- a/app/assets/javascripts/discourse/lib/scripts.js+++ b/app/assets/javascripts/discourse/lib/scripts.js@@ -35,5 +35,21 @@ module.exports = function scriptsTree(app) {trees.push(transpiledWithDecodedSourcemap);}+ // start-discourse.js is a combination of start-app and discourse-boot+ let startDiscourseTree = funnel(`public/assets/scripts`, {+ files: ["start-app.js", "discourse-boot.js"],+ destDir: "scripts",+ });+ startDiscourseTree = babelAddon.transpileTree(+ startDiscourseTree,+ babelConfig+ );+ startDiscourseTree = concat(startDiscourseTree, {+ outputFile: `assets/start-discourse.js`,+ headerFiles: [`scripts/start-app.js`],+ inputFiles: [`scripts/discourse-boot.js`],+ });+ trees.push(startDiscourseTree);+return mergeTrees(trees);};