devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Add Open Graph inspector to Vite DevTools

Open arashsheyda opened this issue 8 months ago • 6 comments

Clear and concise description of the problem

It would be valuable to introduce an Open Graph inspector in Vite DevTools for development mode.

Suggested solution

This feature, inspired by Nuxt DevTools, would allow developers to:

Preview Open Graph metadata (title, description, image, etc.) Quickly debug incorrect or missing tags See how pages will appear when shared on social platforms

Since this is not framework-specific, it would be a great addition to Vite DevTools and improve the debugging experience for any Vite-based project.

Alternative

No response

Additional context

https://github.com/nuxt/devtools/blob/main/packages/devtools/client/pages/modules/open-graph.vue

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.

arashsheyda avatar Mar 23 '26 04:03 arashsheyda

thinking about how we would implement this... do we need to fetch the page content and filter the meta tags and etc. in order for it to be framework agnostic? or is there any vite hooks that we can use. any ideas?

arashsheyda avatar Mar 24 '26 05:03 arashsheyda

Having vite hooks make this feel like it's not mandatory, that frameworks doesn't need to implement it.

We should maybe only show the open graph of what is currently in the meta tags ?

huang-julien avatar Mar 26 '26 18:03 huang-julien

@huang-julien I tried to implement it but was unsuccessful, do you wanna give it a go? 😁 :ty:

arashsheyda avatar May 26 '26 23:05 arashsheyda

Sure :heart:

huang-julien avatar May 27 '26 08:05 huang-julien

@arashsheyda can you assign the issue to me so i stop forgetting working on it :joy: ?

btw does such integration should be in another package (likely named open-graph) in core that is being added by packages\core\src\node\plugins\index.ts ?

huang-julien avatar Jun 07 '26 16:06 huang-julien

I don't have permissions, so I defer to @antfu or @webfansplz . oww good question, I was thinking it can be just a vite devtools tab but... what do you all think?

arashsheyda avatar Jun 08 '26 01:06 arashsheyda