Skip to content

Vite Compatibility #581

Closed
Closed
@YannikSc

Description

@YannikSc

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: EnhancementIssue contains an enhancement related to a specific component. Additional functionality has been addvue2-portable

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions