vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Template Props and vue.ts #2738

Open garaboncias opened 3 years ago

garaboncias commented 3 years ago

Info

Problem

Template Props not works well with vue.ts files

We use the following naming pattern: zzz.vue for zzz component (html, css) zzz.vue.ts for script part of the component we used this pattern because when we ctrl+click to the vue component imports in ts files jump to the right file in vs-code

vetur use "vue.ts" file pattern for marking something (in serviceHost.ts:372 and utils.ts:16), which conflict with our setup if i set some other filename pattern in those lines Template Props validation and intelisense start to working (if we copy vue.ts content to vue file script part it's works, as well if we name our scripts something other then .vue.ts.)

Is there any way to change that pattern?

Reproducible Case

https://github.com/garaboncias/veturpack

stefanKuijers commented 3 years ago

I would love to see a way to change the file patterns as well. Specifically when you work in big projects where you can't just change stuff around.

yoyo930021 commented 3 years ago

TypeScript language service don't support custom file extension. It will be very difficult to support.

garaboncias commented 3 years ago

Could you help me what is the use of vue.ts file pattern? Who generate that files? As i see serviceHost.ts only consume them