Skip to content

Commit 014cf6a

Browse files
authored
fix(esm-resolver): only return early if the specifier is an unsupported file (#789)
1 parent 37b4a40 commit 014cf6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/register/esm.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const host: ts.ModuleResolutionHost = {
1818
}
1919

2020
export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
21-
if (!AVAILABLE_EXTENSION_PATTERN.test(specifier)) {
21+
if (specifier.startsWith('file:') && !AVAILABLE_EXTENSION_PATTERN.test(specifier)) {
2222
return nextResolve(specifier)
2323
}
2424

0 commit comments

Comments
 (0)