Files
bun.sh/test/regression/issue
Claude Bot 9ddc74540a Fix module resolution: '.' in subdirectory resolves to index.ts
Previously, importing '.' or './' from within a subdirectory would
incorrectly resolve to a file with the same name in the parent
directory, rather than the index file in the current directory.

For example, importing from 'lib/run.ts':
```ts
import { foo } from ".";
```

Would incorrectly resolve to the root 'lib.ts' instead of 'lib/index.ts'.

This fix adds a check in loadAsFile() to detect when the path being
resolved is actually a directory. If the basename has no extension
(indicating it's likely a directory reference), we check if it exists
as a directory before attempting file resolution. This ensures directory
imports correctly fall through to index file resolution.

Fixes #24449

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 13:15:36 +00:00
..
2025-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2024-06-14 01:50:36 -07:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-10-20 14:07:31 -07:00
2025-11-05 22:04:14 -08:00
2025-11-05 22:04:14 -08:00
2025-07-20 23:02:10 -07:00