{"id":17399,"library":"vite-plugin-vue-setup-extend-plus","title":"Vue 3 `<script setup>` Name & Attrs Extension","description":"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.","status":"deprecated","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/chenxch/vite-plugin-vue-setup-extend-plus","tags":["javascript","vite","vite plugin","vite-plugin-vue-setup-extend","vue","setup","name","inheritAttrs"],"install":[{"cmd":"npm install vite-plugin-vue-setup-extend-plus","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-vue-setup-extend-plus","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-vue-setup-extend-plus","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for any Vite plugin to function within a Vite project. Explicitly states `>=2.0.0` in README.","package":"vite","optional":false},{"reason":"Required alongside this plugin in `vite.config.ts` to process Vue SFCs.","package":"@vitejs/plugin-vue","optional":false}],"imports":[{"note":"This plugin is a default export. Ensure you're importing it directly as a default, not a named export. Vite projects are typically ESM-first.","wrong":"const vueSetupExtend = require('vite-plugin-vue-setup-extend-plus')","symbol":"vueSetupExtend","correct":"import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'"},{"note":"This is a standard named import for Vite configuration files.","wrong":"import defineConfig from 'vite'","symbol":"defineConfig","correct":"import { defineConfig } from 'vite'"},{"note":"The official Vue plugin for Vite is a default export.","wrong":"import { vue } from '@vitejs/plugin-vue'","symbol":"vue","correct":"import vue from '@vitejs/plugin-vue'"}],"quickstart":{"code":"import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'\n\nexport default defineConfig({\n  plugins: [\n    vue(), \n    vueSetupExtend()\n  ],\n})\n\n// In your Vue SFC (e.g., src/App.vue):\n// <template>\n//   <div>hello world {{ message }}</div>\n// </template>\n\n// <script lang=\"ts\" setup name=\"App\" inheritAttrs=\"false\">\n//   const message = 'from App component'\n// </script>\n","lang":"typescript","description":"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."},"warnings":[{"fix":"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.","message":"This package is explicitly deprecated in its README, which states: \"Iterative updates are made in unplugin-vue-setup-extend-plus during the later period.\" Users should migrate to `unplugin-vue-setup-extend-plus` for continued maintenance and new features.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"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.","message":"The package has only a single published version (0.1.0) and is no longer actively maintained. This means it will not receive bug fixes, security updates, or support for newer Vue/Vite versions.","severity":"gotcha","affected_versions":"0.1.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Run `npm install vite-plugin-vue-setup-extend-plus -D` or `yarn add vite-plugin-vue-setup-extend-plus -D` to install it.","cause":"The package might not be correctly installed or is missing from `devDependencies`.","error":"Error: Cannot find module 'vite-plugin-vue-setup-extend-plus'"},{"fix":"Ensure the import is `import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'` in your `vite.config.ts`.","cause":"Incorrect import statement; `vite-plugin-vue-setup-extend-plus` is a default export, but it might be imported as a named export.","error":"TypeError: vueSetupExtend is not a function"}],"ecosystem":"npm","meta_description":null}