Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/kalimahapps/vite-plugin-vue-setup-inherit-attrs
- Owner: kalimahapps
- License: mit
- Created: 2022-06-11T04:11:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-09T17:17:02.000Z (7 months ago)
- Last Synced: 2024-11-20T17:07:01.267Z (about 2 months ago)
- Topics: npm-package, typescript, vite, vue, vue3
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/vite-plugin-vue-setup-inherit-attrs
- Size: 30.3 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)