Skip to content

Auto-imports not suggesting import map paths when importing from the same base directory #29464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bira37 opened this issue May 27, 2025 · 0 comments

Comments

@bira37
Copy link

bira37 commented May 27, 2025

Version: Deno 2.3.3

This issue appears to be related to both #28662 and #29098.

Given an import map entry like:

{
  "imports": {
    "$src/": "./src/"
  }
}

And a folder structure such as:

src/
├── a.ts
└── b.ts

Inside a.ts, the editor currently only suggests the relative import path ./b.ts when attempting to import b.ts. It does not suggest the import map alias $src/b.ts.

This behavior differs from previous versions (prior to Deno 2.3.x), where the alias-based path was also suggested. I believe we should consider either restoring this behavior or providing a configuration option to prioritize import map aliases over relative paths in import suggestions.

Let me know if there's any more context I can provide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant