absolute ESM imports don't support directory imports either

This commit is contained in:
Simon Knott 2024-08-07 17:21:57 +02:00
parent 6fc98af1d0
commit 5b8f3d038b
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -156,7 +156,7 @@ export function resolveHook(filename: string, specifier: string, dontResolveDire
if (path.isAbsolute(specifier)) { if (path.isAbsolute(specifier)) {
// Handle absolute file paths like `import '/path/to/file'` // Handle absolute file paths like `import '/path/to/file'`
// Do not handle module imports like `import 'fs'` // Do not handle module imports like `import 'fs'`
return resolveImportSpecifierExtension(specifier, dontResolveDirectories); return resolveImportSpecifierExtension(specifier, false);
} }
} }