Home > database >  vue3 ssr does not return plain html
vue3 ssr does not return plain html

Time:12-26

I'm using quasar and vue3 to build an SSR app

In chrome developer mode when I visualize the generated HTML, I have some Vue components not compiled to raw HTML like:

<body  data-server-rendered>
<div v-for="deal in clientssList" :key="client.Id">
  <CLientItemSmDown :ClientModel="deal"></CLientItemSmDown>
</div>

is this normal, isn't SSR supposed to return raw HTML so bots can read it?

CodePudding user response:

Saw this question last time already (can't find it back).

But no, CLientItemSmDown is a valid web-component and don't need to be transformed into a built-in HTML tag like input, div etc...
There is maybe an option to convert it down the road to some HTML, but I don't think that it's necessary and it may not be easily done if it's not supported by default.

That page may be quite interesting regarding Vue Web-components.

You may raise a Github issue or join their Discord.


The TLDR being that it's fine to let it as is IMO.

  • Related