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