nuxtlabs / nuxt-component-meta

Gather Nuxt components metadata on build time and make them available on production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get screenshot of the component

atinux opened this issue · comments

Using data64, this could be an option disabled by default.

Would love to explore the best way to do this @farnabaz @kevinmarrec

I think it would be possible once nuxt/framework#5689 land, can you confirm @danielroe @pi0 ?

Components prefixed wth .island and .server are possible to be individually rendered with linked PR with a specific endpoint.

Yes. Currently the PR returns a result like:

{
  "rendered": [ { "html": "<pre data-v-a0337c84> Route: /foo </pre>" } ],
  "scripts": "<script type=\"module\" src=\"/_nuxt/entry.65591c03.mjs\" crossorigin></script><script type=\"module\" src=\"/_nuxt/RouteComponent.96ab4d69.mjs\" crossorigin></script>",
  "styles": "<link rel=\"stylesheet\" href=\"/_nuxt/entry.4e0f8d43.css\"><link rel=\"stylesheet\" href=\"/_nuxt/RouteComponent.2df1bd45.css\">"
}

(API may change as the PR is refined.)

This allows for a completely independent HTML document to be constructed which renders that component only, including all needed CSS. (scripts should be ignored in this context.)

Who should we assign @atinux ?

We can start without screenshots for now on Studio, let's keep it for now and do not assigne anyone.