devtools icon indicating copy to clipboard operation
devtools copied to clipboard

fix: collected usage count of components

Open FlorianWerndl opened this issue 2 years ago â€ĸ 1 comments

🐛 The bug

Usage count of components (user and build-in) seems to be incorrect (in combination with @nuxt/i18n?)

If you take a look at the given stackblitz example you can find CiButton to be used at pages/index.vue and pages/about/index.vue. At pages/about/index.vue there is also the build-in ClientOnly component used.

If you open the DevTools the usage count of the components seems to be incorrect.

Bildschirmfoto 2023-11-14 um 14 00 21

đŸ› ī¸ To reproduce

https://stackblitz.com/edit/github-3wcxar

🌈 Expected behavior

The usage count of the CiButton component should be 2 and point to the related pages. The usage count of ClientOnly should be 1 and point to the related page.

â„šī¸ Additional context

I am using https://i18n.nuxtjs.org/ module and maybe this behavior is related to the usage of this module.

FlorianWerndl avatar Nov 14 '23 13:11 FlorianWerndl

This is a known limitation, because of Vite's nature of being on-demand, only the modules that have been requested will be presented in the graph. We will later add a button to "Travse all components" to make it more accurate.

antfu avatar Nov 20 '23 13:11 antfu