Skip to content

Confiction with custom typescript plugins, monkey patching languageServiceHost.resolveModuleNameLiterals not work #5638

@dyf19118

Description

@dyf19118

Vue - Official extension or vue-tsc version

3.0.6

VSCode version

1.103.2

Vue version

3.5.18

TypeScript version

5.8.3

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (28) x64 Intel(R) Core(TM) i7-14700KF
    Memory: 17.98 GB / 31.84 GB
  Binaries:
    Node: 24.2.0 - C:\nvm4w\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 11.3.0 - C:\nvm4w\nodejs\npm.CMD
    pnpm: 10.6.5 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.22621.3527

package.json dependencies

Steps to reproduce

reproduce steps are listed in the discussion: #5628

What is expected?

Monkey patching languageServiceHost.resolveModuleNameLiterals should work whether Vue official extension is enabled or not.

What is actually happening?

After Vue official extension enabled, module resolution of project files (non node_modules files) cannot be intercepted by monkey-patched languageServiceHost.resolveModuleNameLiterals in custom TS plugin anymore.

Link to minimal reproduction

discussion

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstupstream: volar

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions