devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Add plugin package name

Open sapphi-red opened this issue 9 months ago • 2 comments

Clear and concise description of the problem

Image

Currently, it is not obvious which plugin originated from which package. It would be helpful to show that information.

Suggested solution

Recommend plugins to add api.devtools.package values:

const p = {
  name: 'foo',
  api: {
    devtools: {
      package: '@vitejs/plugin-vue'
    }
  }
}

and make devtools will read that information.

We can also add description property to show it.

Alternative

No response

Additional context

No response

Validations

  • [x] Follow our Code of Conduct
  • [x] Read the Contributing Guide.
  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

sapphi-red avatar Feb 04 '26 11:02 sapphi-red

While I love this idea, do you think it would be some info that is more general to the plugin interface instead? That not only devtools but other integrations might also found them useful. I am thinking something like:

const p: Plugin = {
  name: 'vue',
  meta: {
    package: '@vitejs/plugin-vue',
    version: '1.1.2'
  }
}

antfu avatar Feb 05 '26 01:02 antfu

Yes, I think we can put it to the plugin interface more generally. version already exists so I think we don't need meta.version. But maybe we want plugin versions separate from package versions 🤔

sapphi-red avatar Feb 05 '26 01:02 sapphi-red