Add defineOptions macro for Vue <script setup>.
npm install unplugin-vue-define-options
Options API can be declared using the defineOptions in , specifically to be able to set name, props, emits, and render inside of one function.
If you support this feature, feel free to hit like 👍 or comment on RFC Discussion. Thanks!
- ✨ 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 most bundlers powered by unplugin.
- Vite, Nuxt
- Webpack, Rspack, Vue CLI
- Rollup
- esbuild
- and more...
- Related issue
- RFC
MIT License © 2022-PRESENT Kevin Deng