[vue-tsc][typescript-plugin] does not work with `rewriteRelativeImportExtensions`

Author: susnuxCreated Feb 5, 2026Updated Jul 9, 2026
Labelsgood reproduction ✨🔩 p2-edge-caseupstream: volar

Vue - Official extension or vue-tsc version

3.2.4

Vue version

3.5.27

TypeScript version

5.9.3

Steps to reproduce

  1. Create Typescript + Vue project
  2. Use rewriteRelativeImportExtensions to allow importing with full extension ("moduleResolution": "bundler")
  3. See that import like import FooBar from './FooBar.vue' are considered invalid by vue-tsc

What is expected?

No errors as per ESM you should import with full file extensions.

What is actually happening?

Errors like:

SettingsApp.vue:100:23 - error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "../components/SettingsTabs/ServerTab.vue".

100 import ServerTab from '../components/SettingsTabs/ServerTab.vue' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-tt1ygurt?file=tsconfig.json

See minimal reproduction, run npm run ts:check there.

Any additional comments?

In VSCode no errors are shown, so the Vue + Typescript integration works fine there. The problem only happens in vue-tsc.