Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

unplugin-vue-define-options

vue-macros96.2kMIT1.5.5TypeScript support: included

Add defineOptions macro for Vue <script setup>.

vue-macros, macros, vue, sfc, setup, script-setup, define-options, unplugin

readme

unplugin-vue-define-options npm

Options API can be declared using the defineOptions in <script setup>, 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!

Features

  • ✨ With this macro, you can use Options API in Vue <script setup>.
  • 💚 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 3
    • esbuild
    • and more...

Usage

📜 Documentation

See Also

Sponsors

License

MIT License © 2022-PRESENT 三咲智子