bira37B
Deno8mo ago
bira37

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

Version: Deno 2.3.3

This appears to be a recent change from this PR: https://github.com/denoland/deno/pull/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, where the alias-based path was suggested, not the relative one. This is a change from how it previously worked, and it’s now affecting our workflow significantly. Can something be done to help us keep the old behavior?
Was this page helpful?