vuejs / vue-class-component

ES / TypeScript decorator for class-style Vue components.
MIT License
5.81k stars 429 forks source link

[vue3] Component is missing template or render function. #572

Closed kongxiaojian123 closed 2 years ago

kongxiaojian123 commented 2 years ago

vue version: 3.2.20

This framework is not available in Vue 3.2.20

borkeszmate commented 2 years ago

This issue is linked to vitejs/plugin-vue. Temp fix is to set plugin-vue version to 1.8.0. I made a PR, but I didn't receive any response so far. https://github.com/vitejs/vite/pull/5374

calebeaires commented 2 years ago

I got stuck on this problem too. Is there some workaround?

Ps. Vue Class Component is os useful and good coding style, but its community seams self motivated to improve it.

borkeszmate commented 2 years ago

@calebeaires Have you tried fixing @vitejs/plugin-vue to 1.8.0? It should temporaty fix the bug. The above mentioned PR is partly accepted, so that I hope it can be merged in the close future. After that the issue should be fixed.

calebeaires commented 2 years ago

@borkeszmate... I am following that PR. Happy to see things going on...

turbobuilt commented 2 years ago

U guys are amazing... thanks so much for saving me with the 1.8.0 workaround. Have a lot of stuff I need to get done, wasted enough time dinking around with it as I try to get a new device set up!

borkeszmate commented 2 years ago

@turbobuilt the PR fixing the bug was merged this week. Next vitejs/plugin-vue release should not have issue with class components. :) https://github.com/vitejs/vite/pull/5374