Skip to content
Discussion options

You must be logged in to vote

Sorry for the very late reply here.

This was a real bug in our Vue SFC compiler, and it has since been fixed.

When you use defineProps<T>() with T imported from another file, @vue/compiler-sfc resolves that import relative to the filename it is handed. Our compiler was passing only the relative filename instead of the full path, so Vue looked for ./types relative to the working directory rather than next to your component, and reported Failed to resolve import source "./types".

Current versions pass the full path, and there is now a regression test covering exactly this case. I re-ran your scenario on the current stack (bit 2.2.8 with bitdev.vue/vue-env) and it compiles fine, with props a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidfirst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants