Skip to content

Commit

Permalink
Simplify internal preresolution
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Oct 15, 2024
1 parent 9d340de commit 2d6700a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,8 @@ exports.directory = function * (dirname, parentURL, opts = {}) {
// Internal preresolution path, do not depend on this! It will be removed without
// warning.
if (resolutions) {
const imports = resolutions[directoryURL.href]

if (typeof imports === 'object' && imports !== null) {
if (yield * resolve.packageImportsExports('bare:addon', imports, directoryURL, true, opts)) {
return true
}
if (yield * resolve.preresolved('bare:addon', resolutions, directoryURL, opts)) {
return true
}
}

Expand Down

0 comments on commit 2d6700a

Please sign in to comment.