QingWei-Li / vuep

🎡 A component for rendering Vue components with live editor and preview.
https://cinwell.com/vuep/
MIT License
887 stars 103 forks source link

SSR not supported? #12

Open ruslankonev opened 7 years ago

ruslankonev commented 7 years ago

Hi, great component, but if I use it inside nuxt.js with ssr-support (only in browser-side) backend-side vue-renderer was delete component from page and show message:

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. 
This is likely caused by incorrect HTML markup, for example nesting block-level elements inside
<p>, or missing <tbody>. Bailing hydration and performing full client-side render.
reverland commented 7 years ago

maybe it relate to <style> nest in <div>? @QingWei-Li

ruslankonev commented 7 years ago

I found what happened. If put Vuep in div or other element which has siblings content such as:

<div>
  <h1>title</head>
  <vuep></vuep>
</div>

and say Nuxt.js, what Vuep must render only for browser build, render compiler in backend ignore a Vuep, and on the browser the div, which contain Vuep, have only H1 tag and error in console - DOM tree is not matching..