microsoft / microsoft/TypeScript

moduleResolution Bundler and importModuleSpecifierEnding

オープン
#60,478 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs Investigation
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

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:

  1. Set the compiler compiler options in a tsconfig:
{
    "module": "ESNext",
    "target": "ESNext",
    "moduleResolution": "Bundler"
}

The suggested paths to import, for example, are:

Image

  1. Change to "moduleResolution": "Node" and then reload VSCode.

The suggested paths to import are now:

Image

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",
}

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、示されている TypeScript コンパイラーオプションと importModuleSpecifier 設定を使って import QuickFix の候補を再現し、Bundler と Node の解決を比較します。提案されるインポート末尾を担当する TypeScript または VS Code のエントリポイントを追跡します。Bundler が設定された環境設定に従って、要求された最小形式または非相対形式の候補を一貫して生成すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript, vscode
領域
developer-experience
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。