-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt autoimport component prefix: add typescript dynamic name support #6007
Comments
I'll try with |
Indeed, auto-import stopped working properly when upgrading from version v4.0.0-rc3 to v4.0.0. Not only did the prefixes break, but also the styles. |
@sparrow-chik-chrk For now I changed dts: true. Could you please try your case after 4.1.0 is released? |
Also, please see; Test: <PrimeButton label="Submit" /> Config: primevue: {
// ...
autoImport: true,
components: {
prefix: 'Prime'
}
}, Output: /* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
PrimeButton: typeof import('primevue/button')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
export interface ComponentCustomProperties {
AnimateOnScroll: typeof import('primevue/animateonscroll')['default']
FocusTrap: typeof import('primevue/focustrap')['default']
KeyFilter: typeof import('primevue/keyfilter')['default']
Ripple: typeof import('primevue/ripple')['default']
StyleClass: typeof import('primevue/styleclass')['default']
Tooltip: typeof import('primevue/tooltip')['default']
}
} |
Describe the bug
When added in nuxt.config prefix for component, then IDE doesn't see the new component name, it takes types from node_modules folder, where the names of the components are written without prefix.
Reproducer
https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-csnodp?file=README.md
PrimeVue version
4.0.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Nuxt
Browser(s)
No response
Steps to reproduce the behavior
nuxt.config
components: { prefix: 'Pv' }
.vue
file<pv-button label="Check 2" icon="pi pi-check" />
Expected behavior
IDE should take new type name
The text was updated successfully, but these errors were encountered: