vite-plugin-vue-setup-extend-plus is a Vite plugin designed to enhance the Vue 3 `<script setup>` syntactic sugar within Single File Components (SFCs). It specifically introduces support for defining the `name` and `inheritAttrs` attributes directly on the `<script setup>` tag, a capability not natively available in Vue 3's initial `<script setup>` implementation. This allows for easier component introspection and finer control over attribute inheritance for components utilizing the composition API. The package is currently at version 0.1.0 and appears to have had a single release. It builds upon `vite-plugin-vue-setup-extend` but explicitly indicates that "iterative updates are made in unplugin-vue-setup-extend-plus during the later period," suggesting it has been superseded by its `unplugin` counterpart for ongoing development and maintenance. Its primary function is a targeted code transformation during the Vite build process to enable these additional attributes.
npm install vite-plugin-vue-setup-extend-plusVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure `vite-plugin-vue-setup-extend-plus` in your `vite.config.ts` and then apply the `name` and `inheritAttrs` attributes directly to a `<script setup>` block in a Vue SFC.
Migrate your project to use `unplugin-vue-setup-extend-plus` instead. Uninstall `vite-plugin-vue-setup-extend-plus` and install `unplugin-vue-setup-extend-plus`, then update your `vite.config.ts` accordingly.
It is strongly recommended to use the actively maintained `unplugin-vue-setup-extend-plus` to ensure compatibility and ongoing support for your Vue 3 projects.
Run `npm install vite-plugin-vue-setup-extend-plus -D` or `yarn add vite-plugin-vue-setup-extend-plus -D` to install it.
Ensure the import is `import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'` in your `vite.config.ts`.