vitejs / vite-plugin-vue2

Vite plugin for Vue 2.7
MIT License
543 stars 46 forks source link

Allow include/exclude to work on Vue files #102

Open cinderisles opened 4 months ago

cinderisles commented 4 months ago

I noticed that this line prevents include/exclude from working on Vue files, because query.vue will always be true for Vue files.

My use case is that I have a project with both Vue2 and Vue3 SFCs that I want to process with the same Vite config. So I am trying to get the vite plugins to look in different folders based on the Vue version. But since query.vue is true for both Vue 2 and 3 SFC, the filter doesn't work, and Vue 2 files try to get run through Vue 3's compiler, causing errors

Please consider making the filter work regardless of the query.vue value.