microsoft / microsoft/TypeScript
moduleResolution Bundler and importModuleSpecifierEnding
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Does this issue occur when all extensions are disabled?: Yes
Version: 1.95.1 (Universal)
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.4.0
My project is Node/Fastify written in typescript.
Steps to Reproduce:
- Set the compiler compiler options in a tsconfig:
{
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Bundler"
}
The suggested paths to import, for example, are:
- Change to "moduleResolution": "Node" and then reload VSCode.
The suggested paths to import are now:
I want the QuickFix Suggestions from 2. while using "moduleResolution": "Bundler"
I have these settings:
{
"javascript.preferences.importModuleSpecifierEnding": "minimal",
"javascript.preferences.importModuleSpecifier": "non-relative"
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.preferences.importModuleSpecifier": "non-relative",
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the import QuickFix suggestions with the shown TypeScript compiler options and importModuleSpecifier settings, comparing Bundler with Node resolution. Trace the TypeScript or VS Code entry point responsible for suggested import endings. Done means Bundler produces the requested minimal or non-relative suggestions consistently with the configured preferences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100