-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.3: compiler-sfc fails to resolve source when using path mapping #8140
Comments
It seems that it does not work because you're using project references. If you add {
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.vitest.json"
}
]
} |
FYI this specific case should fallback to skipping runtime check without an error with latest |
I get this error (only during build) when importing a type with relative path eg:
when I use project root import, it resolves without errors
I should note that this error arises when I import a file to use in I fixed it with alias import, but I think it should be fixed for relative imports too |
@gVguy |
@gVguy I am having the same issue, also only in an actual build and also only when importing a type to use in defineProps. Interestingly it only occurs on windows build agents, MacOS and linux are fine |
Can't confirm this, for me it occured on MacOS |
@gVguy Thank you, That helps me a lot. |
Vue version
3.3.0-beta.1
Link to minimal reproduction
https://stackblitz.com/edit/node-hrwual?file=repro/src/components/HelloWorld.vue
Steps to reproduce
Consider a component that uses an interface imported with path mapping (as the setup of a project generated with create-vue allows to do):
What is expected?
The compiler should find the file, as if it was imported with:
What is actually happening?
When bumping from v3.2.47 to v3.3.0-beta.1, the compiler throws (with
pnpm dev
orpnpm build
):System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: