From e70bab16e0ad8f2818e0facc2080a7ec96897deb Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 17 Aug 2022 21:42:55 +0100 Subject: [PATCH] DEV: Ensure custom ember-cli addons only output JS files (#17976) Without this filter, a binary file (e.g. `.DS_Store`) in one of these addon directories will be concatenated into the output JS. Note that this filter is applied at the end of the build pipeline, so any hbs files have already been transpiled into `.js`. This mirrors the filtering performed on the main application bundle by Ember CLI: https://github.com/ember-cli/ember-cli/blob/04a38fda2c/lib/broccoli/default-packager.js#L1255 --- app/assets/javascripts/discourse/ember-cli-build.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/ember-cli-build.js b/app/assets/javascripts/discourse/ember-cli-build.js index 0224c3383ae..4b25968d854 100644 --- a/app/assets/javascripts/discourse/ember-cli-build.js +++ b/app/assets/javascripts/discourse/ember-cli-build.js @@ -143,9 +143,11 @@ module.exports = function (defaults) { destDir: "assets/highlightjs", }), concat(mergeTrees([app.options.adminTree]), { + inputFiles: ["**/*.js"], outputFile: `assets/admin.js`, }), concat(mergeTrees([app.options.wizardTree]), { + inputFiles: ["**/*.js"], outputFile: `assets/wizard.js`, }), prettyTextEngine(vendorJs, "discourse-markdown"),