unplugin-vue-setup-extend-plus is an unplugin that augments Vue 3's `<script setup>` syntax, enabling the use of attributes like `name` and `inheritAttrs` directly on the script tag. It also provides an "auto expose" feature to automatically export variables from `<script setup>` for template or component ref access, streamlining component development by reducing boilerplate for exposing reactive state. The current stable version is 1.0.1, indicating a mature feature set. The project shows a consistent, albeit somewhat sporadic, release cadence with frequent patch fixes and minor feature additions, demonstrating active maintenance. Its key differentiator is providing these extensions universally across various build tools (Vite, Webpack, Rollup, Nuxt) through the unplugin architecture, offering a unified developer experience regardless of the underlying bundler.
npm install unplugin-vue-setup-extend-plusVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to configure the plugin in a Vite project, apply script setup attributes like `name` and `inheritAttrs`, and utilize the `enableAutoExpose` feature with its client-side plugin for automatic variable exposure.
Add `import autoExpose from 'unplugin-vue-setup-extend-plus/dist/client/index'; createApp(App).use(autoExpose).mount('#app');` to your `main.ts` or equivalent.To explicitly use your custom `name` attribute and bypass the plugin's automatic generation for a specific component, add the `extendIgnore` attribute to your `<script setup>` tag: `<script setup name="MyComponent" extendIgnore>`.
Always import from the specific entry point for your bundler, e.g., `unplugin-vue-setup-extend-plus/vite` for Vite, `unplugin-vue-setup-extend-plus/rollup` for Rollup, and `unplugin-vue-setup-extend-plus/webpack` for Webpack.
Ensure you are using the correct import path for your build tool, such as `import vueSetupExtend from 'unplugin-vue-setup-extend-plus/vite';` for Vite or `require('unplugin-vue-setup-extend-plus/webpack').default` for Webpack.In your `main.ts` (or equivalent), add `import autoExpose from 'unplugin-vue-setup-extend-plus/dist/client/index'; createApp(App).use(autoExpose).mount('#app');`.Ensure your `tsconfig.json` includes the plugin's type declarations or a global `d.ts` file. Sometimes restarting the TypeScript language server or IDE can resolve it. The plugin ships with types, so usually this is a configuration or caching issue.
No dependency data recorded yet.