1.0.2 • Published 1 year ago

@froxz/vite-plugin-primevue v1.0.2

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

vite-plugin-primevue

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 '@froxz/vite-plugin-primevue'

plugins: [
  vue(),
  primeVue()
]

Options

// vite.config.js
import primevue from '@froxz/vite-plugin-primevue'

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.2

1 year ago