Extend vue script setup syntactic sugar to support inherit-attrs
> [!WARNING] You don't need this plugin if you are using Vue 3.3+
>
> Use defineOptions instead.
npm install vite-plugin-vue-setup-inherit-attrs -D
`
Usage
In vite.config.ts import the plugin and add plugins array:`ts
import { defineConfig, Plugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import inheritAttrs from 'vite-plugin-vue-setup-inherit-attrs';export default defineConfig({
plugins: [vue(), inheritAttrs()],
})
`In vue template add
inherit-attrs="false":
`html
$attrs will be added to this element instead of the root element
``