Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kalimahapps/vite-plugin-vue-setup-inherit-attrs

Add inherit-attrs support for vue3 using vite
https://github.com/kalimahapps/vite-plugin-vue-setup-inherit-attrs

npm-package typescript vite vue vue3

Last synced: about 1 month ago
JSON representation

Add inherit-attrs support for vue3 using vite

Awesome Lists containing this project

README

        


vite-plugin-vue-setup-inherit-attrs


Add support for inheritAttrs in vue-setup using vite




















> [!WARNING] You don't need this plugin if you are using Vue 3.3+
>
> Use [defineOptions](https://vuejs.org/api/sfc-script-setup#defineoptions) instead.

## Install
```
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

// code here

```




## Config
No config needed :)




## Change Log
### 1.0.4
- Moved to full ESM




## Other projects
### [Vue Icons](https://www.npmjs.com/package/@kalimahapps/vue-icons)
60,000+ SVG icons from popular icon sets that you can add seamlessly to your vue projects

### [Vue Popper](https://www.npmjs.com/package/@kalimahapps/vue-popper)
A tooltip component for Vue 3 based on popper.js

### [KalimahApps Eslint Config](https://www.npmjs.com/package/@kalimahapps/eslint-config)
Comprehensive eslint rules for vue projects with typescript




## License
[MIT License](LICENSE)