From 3d7abad9493c415927d972c847f082cd7b264124 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 12 May 2021 13:44:24 -0400 Subject: [PATCH] FIX: We should include resumable.js in the admin bundle (#13049) Normally we'd use `ember-auto-import` for this, but it's not run on our admin tree due to the quirky way we load it conditionally. Instead we'll append it at the bottom like our Rails app does. --- app/assets/javascripts/discourse/ember-cli-build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/ember-cli-build.js b/app/assets/javascripts/discourse/ember-cli-build.js index 5932ffae894..137b9a29afc 100644 --- a/app/assets/javascripts/discourse/ember-cli-build.js +++ b/app/assets/javascripts/discourse/ember-cli-build.js @@ -36,6 +36,10 @@ module.exports = function (defaults) { app.import(vendorJs + "jquery.fileupload.js"); app.import(vendorJs + "jquery.autoellipsis-1.0.10.js"); + let adminVendor = funnel(vendorJs, { + files: ["resumable.js"], + }); + return mergeTrees([ discourseScss(`${discourseRoot}/app/assets/stylesheets`, "testem.scss"), createI18nTree(discourseRoot, vendorJs), @@ -46,7 +50,7 @@ module.exports = function (defaults) { destDir: "assets/highlightjs", }), digest( - concat(app.options.adminTree, { + concat(mergeTrees([app.options.adminTree, adminVendor]), { outputFile: `assets/admin.js`, }) ),