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
This commit is contained in:
David Taylor 2022-08-17 21:42:55 +01:00 committed by GitHub
parent 602efedd81
commit e70bab16e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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"),