nuxt / devtools

Unleash Nuxt Developer Experience
https://devtools.nuxt.com
MIT License
2.85k stars 153 forks source link

fix: Components that are used shows up as Unused #552

Open metkm opened 8 months ago

metkm commented 8 months ago

🐛 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

antfu commented 8 months ago

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.