nuxt / nuxt/devtools

fix: collected usage count of components

Open
#515 1 comment 0 reactions 1 assignee View on GitHub

@antfu is already working on this.

Since Nov 20, 2023.

bug
Dominant language
TypeScript
Stars
3.3k
Forks
214
Avg merge
13h 22m
Merged PRs (30d)
18

Description

🐛 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.