devtools icon indicating copy to clipboard operation
devtools copied to clipboard

fix: Components that are used shows up as Unused

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

🐛 The bug

Filtering for unused components shows components that are used as unused. I think (?) it shows only components that are used on the current page

đŸ› ī¸ To reproduce

https://github.com/metkm/unused-components

🌈 Expected behavior

Shouldn't show used components as not used

â„šī¸ Additional context

https://github.com/nuxt/devtools/issues/358#issuecomment-1868263174 https://github.com/nuxt/devtools/issues/358#issuecomment-1868295864

metkm avatar Dec 23 '23 14:12 metkm

This is due to Nuxt was mistakenly warming up all routes, which has been fixed in the latest version, so the currently the inspector only knows the components on the current page.

We will need to add a button like "Scan components for all routes" to allow users to bring the behavior back manually.

antfu avatar Dec 27 '23 14:12 antfu