primevue-vite-plugin
Very simple Vite plugin for automatic imports of PrimeVue. Ported from vite-plugin-vuetify that was created by @KaelWD
Automatic imports
// vite.config.js
import primevue from 'primevue-vite-plugin'
plugins: [
vue(),
primeVue()
]
Options
// vite.config.js
import primevue from 'primevue-vite-plugin'
plugins: [
vue(),
primeVue({
sfc: true // Read: https://www.primefaces.org/primevue/setup (Single File Components)
})
]
Caveats
When using this plugin you can define componets in your template as camel, kebab, or lower case, all will produce same result example:
<template>
<InputSwitch/>
<input-switch/>
<inputswitch/>
</template>
Exceptions (Components that have same name as HTML elements:
<template>
<Button/> //should be defined as Capitilize
</template>