Closed
Description
The problem
When using Vue 3 and Vite for building PrimeVue components can't be used as they throw a Uncaught SyntaxError: import not found: default
in the browser console.
Vite also give a warning for PrimeVue: [vite] cannot resolve entry for dependency primevue.
Reproduce
# Setup Vue 3 with Vite as described on vuejs.org
npm init vite-app hello-vue3 # OR yarn create vite-app hello-vue3
cd hello-vue3
npm install
# Install PrimeVue 3 as primefaces.org describes
npm install primevue@^3.0.0 --save
# Import any component in the src/main.js file
# Like the dialog (import Dialog from 'primevue/dialog';)
# Run vite
npm run dev
# Open http://localhost:3000/ (or similar) in your browser an open the console
Activity