Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Vue compiler does not correctly resolve ${configDir} from extended tsconfigs #13484

Copy link
Copy link
@EwenDC

Description

@EwenDC
Issue body actions

Vue version

3.5.16

Link to minimal reproduction

https://stackblitz.com/edit/vue-compiler-sfc-configdir-bug?file=tsconfig.app.json

Steps to reproduce

  1. Open the minimal reproduction and observe the following compiler error:
[plugin:vite:vue] [@vue/compiler-sfc] Failed to resolve extends base type.
  1. Open the tsconfig.app.json file and uncomment the following lines:
  // "compilerOptions": {
  //   "paths": {
  //     "@/*": ["src/*"]
  //   }
  // },
  // "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
  1. In the terminal type r then press enter to reload the dev server
  2. The compiler error should disappear

What is expected?

There should not be a compiler error at any point, as the two versions of the tsconfig file are parsed identically by TypeScript.

What is actually happening?

When using a tsconfig that extends another tsconfig, and the extended config uses the ${configDir} magic string in the include or compilerOptions.paths settings, Vue fails to resolve imported base types for types passed to the defineProps macro.

System Info

System:
    OS: macOS 15.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 304.44 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
    npm: 10.5.2 - ~/.nvm/versions/node/v20.13.1/bin/npm
    pnpm: 9.1.1 - ~/.nvm/versions/node/v20.13.1/bin/pnpm
  Browsers:
    Chrome: 137.0.7151.104
    Safari: 18.5

Any additional comments?

No response

llamington

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: sfc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.