When I import PrimeVue and configure it in the theme/index.ts file, I got a error:
4:34:33 PM [vitepress] Pre-transform error: Failed to resolve entry for package "primevue". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "primevue" package
4:34:33 PM [vitepress] Internal server error: Failed to resolve entry for package "primevue". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "primevue" package
Plugin: vite:import-analysis
Reproduction
Create a vitepress project theme with custom theme:
### Additional context
_No response_
### Validations
- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).
- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)
- [X] Read the [docs](https://vitepress.dev).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
When I import PrimeVue and configure it in the theme/index.ts file, I got a error:
Reproduction
Create a vitepress project theme with custom theme:
choose all default but the Theme section:
then add the PrimeVue lib:
use it in the theme/index.ts
then run
pnpm docs:dev
Expected behavior
It should be running without any error, but i got a package error. It seems like there's some problem with
vite:import-analysis
System Info