Skip to content

Commit

Permalink
use first entry of resolves, others are alternatives vol 2
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Jan 26, 2023
1 parent ba122f9 commit 2f051e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ async function checkExportsMapIntegrity(args: {
if (args.includesCommonJS) {
const cjsResult = resolve.resolve(args.packageJSON, definedExport, {
require: true,
});
})?.[0];
if (typeof cjsResult === 'string') {
cjsSkipExports.add(cjsResult);
}
}
const esmResult = resolve.resolve(args.packageJSON, definedExport);
const esmResult = resolve.resolve(args.packageJSON, definedExport)?.[0];
if (typeof esmResult === 'string') {
esmSkipExports.add(esmResult);
}
Expand Down

0 comments on commit 2f051e1

Please sign in to comment.