1.0.1 • Published 1 year ago

primevue-vite-plugin v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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>
1.0.1

1 year ago

1.0.0

2 years ago