- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.6k
 
Open
Labels
Status: Pending ReviewIssue or pull request is being reviewed by Core TeamIssue or pull request is being reviewed by Core Team
Description
Describe the bug
The Vue language tool picks up every GlobalComponents definition in the entire project directory, including those in node_modules. This causes type pollution for all users, even if they are not globally importing components or are using a global name prefix for their global imports.
Installing the primevue package by it self, registers all PrimeVue components as GlobalComponents.
Pull Request Link
More context in the PR description:
#7977
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-at51ahpu?file=src%2FApp.vue
Environment
- VSCode with the Official Vue Extension
 - Webstorm which uses also uses 
@vue/language-server 
Vue version
3.5.18
PrimeVue version
4.3.7
Steps to reproduce the behavior
- Install the Official Vue Extension in VSCode
 - Create a Vue project and install the primevue package.
 - Even without adding PrimeVue to the Vue application the Vue Language Server assumes that every PrimeVue Component is added globally.
 
Expected behavior
Like with any other vue component library, only components that the user is explicitly importing globally should be added to global type definitions.
unplugin-vue-components can do this for example.
S3v3Nice
Metadata
Metadata
Assignees
Labels
Status: Pending ReviewIssue or pull request is being reviewed by Core TeamIssue or pull request is being reviewed by Core Team