FIX: Allow `@ember/test` import in embercli prod builds (#16264)

This matches the behavior of legacy discourse-loader and the regular Ember resolver.
This commit is contained in:
Jarek Radosz 2022-03-23 14:28:09 +01:00 committed by GitHub
parent 97e7bb1ce4
commit 7fcf4dcd4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -40,7 +40,11 @@ module.exports = {
m = modules[entry.module] = [];
}
m.push(entry);
if (entry.module === "@ember/test") {
m.push({ ...entry, global: `(Ember.Test && ${entry.global})` });
} else {
m.push(entry);
}
}
let output = "";