Add defineOptions macro for Vue <script setup>.
npm install @94ai/unplugin-vue-define-optionsOptions API can be declared using the defineOptions in , specifically to be able to set name, props, emits, and render inside of one function.
unplugin-vue-define-options/vite cannot config defineCompontent import from vue-demi, @94ai/unplugin-vue-define-options export defineCompontent from 'vue-demi'
use vue-demi to compatible vue2 or 3.
- ✨ With this macro, you can use Options API in Vue .
- 💚 Supports both Vue 2.7 and Vue 3 out-of-the-box.
- 🦾 Full TypeScript support.
- ⚡️ Supports Vite, Nuxt, Webpack, Vue CLI, Rollup 3, esbuild and more, powered by unplugin.
- Related issue
- RFC