Skip to content

Commit

Permalink
use new resolvedTo after fallback resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Feb 8, 2024
1 parent 088081a commit b732e72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/module-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ export class Resolver {
return resolution;
}

if (nextRequest.resolvedTo) {
return nextRequest.resolvedTo;
}

if (nextRequest.fromFile === request.fromFile && nextRequest.specifier === request.specifier) {
throw new Error(
'Bug Discovered! New request is not === original request but has the same fromFile and specifier. This will likely create a loop.'
Expand Down

0 comments on commit b732e72

Please sign in to comment.