Skip to content

Commit

Permalink
fix(esm-resolver): only return early if the specifier is an unsupport…
Browse files Browse the repository at this point in the history
…ed file (#789)
  • Loading branch information
fargito authored Jun 26, 2024
1 parent 37b4a40 commit 014cf6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/register/esm.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const host: ts.ModuleResolutionHost = {
}

export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
if (!AVAILABLE_EXTENSION_PATTERN.test(specifier)) {
if (specifier.startsWith('file:') && !AVAILABLE_EXTENSION_PATTERN.test(specifier)) {
return nextResolve(specifier)
}

Expand Down

0 comments on commit 014cf6a

Please sign in to comment.