microsoft / microsoft/TypeScript

`Go to Definition for non-JS/TS files` doesn't respect `jsconfig.json`/`tsconfig.json`

Open
#44,917 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

v1.57 introduced Go to Definition for non-JS/TS files, it works great for general relative path imports, but fails to resolve when the path is aliased.

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: v1.57.1
  • OS Version: Windows 10

Minimal Repro Link

import './general.css' // 👈 works
import './src/aliased.css' // 👈 works
import '@/aliased.css' // 👈 fails

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked minimal repro and compare the working relative CSS imports with the aliased import using the repository's jsconfig.json or tsconfig.json. Trace the Go to Definition path for non-JS/TS files and verify that aliased CSS paths resolve consistently with the configured path mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.