Skip to content

Commit 8d21cfb

Browse files
authored
oh, also it's actually a set
1 parent a9df92d commit 8d21cfb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/ExportsFieldPlugin.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,14 @@ module.exports = class ExportsFieldPlugin {
114114
}
115115

116116
if (paths.length === 0) {
117-
const conditions =
118-
this.conditionNames.length === 1
119-
? `the condition "${this.conditionNames[0]}"`
120-
: `the conditions ${JSON.stringify(this.conditionNames)}`;
117+
const conditions = [...this.conditionNames];
118+
const conditionsStr =
119+
conditions.length === 1
120+
? `the condition "${conditions[0]}"`
121+
: `the conditions ${JSON.stringify(conditions)}`;
121122
return callback(
122123
new Error(
123-
`"${remainingRequest}" is not exported under ${conditions} from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`,
124+
`"${remainingRequest}" is not exported under ${conditionsStr} from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`,
124125
),
125126
);
126127
}

0 commit comments

Comments
 (0)