primefaces / primevue-nuxt-module

MIT License
70 stars 11 forks source link

Note for Nuxt devs for PrimeVue < v3.40.0 #46

Closed matthew-dean closed 5 months ago

matthew-dean commented 6 months ago

Note: Nuxt-Primevue relies on PrimeVue v3.40.0+, and you might have issues with PrimeVue 3.35.0+ styling due to the breaking change related to this issue.

To use PrimeVue with Nuxt in previous versions, you can use the PrimeVue Vue plugin along with a Nuxt Client plugin. For example:

import PrimeVue from 'primevue/config'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(PrimeVue, { ripple: true })
})

In your package.json, you'll want to make sure you have PrimeVue installed like "primevue": "~3.34.1" (and not "^3.34.1" if you don't want to include the breaking style changes).

Hope that helps someone else who came across this issue! (Unfortunately, PrimeVue documentation is not pinned to individual release versions other than major, so it's unclear what other changes there have been between 3.34 and the current version.)