Skip to content

Commit 6b36e64

Browse files
authored
drop the listFormat
1 parent d872218 commit 6b36e64

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/ExportsFieldPlugin.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,10 @@ module.exports = class ExportsFieldPlugin {
115115

116116
if (paths.length === 0) {
117117
let conditions;
118-
if (this.conditionNames.length > 1) {
119-
const listFormat = new Intl.ListFormat("en", { type: "disjunction" });
120-
conditions = `the conditions ${listFormat.format(this.conditionNames.map(c => `"${c}"`))}`;
121-
} else if (this.conditionNames.length == 1) {
118+
if (this.conditionNames.length == 1) {
122119
conditions = `the condition "${this.conditionNames[0]}"`;
123120
} else {
124-
conditions = "the conditions [empty]";
121+
conditions = `the conditions ${JSON.stringify(this.conditionNames)}`;
125122
}
126123
return callback(
127124
new Error(

0 commit comments

Comments
 (0)