Home

Issue: 921

Disable ssr, encounter an error when using vue-js-modal

[issue link]

Because this component does not support ssr, so I disabled ssr:

{ src: '~plugins/vue-js-modal', ssr: false }

Everything looks normal, but when I open the browser, the page display is not normal, in the browser’s console to find this error:
vue.runtime.esm.js:430 [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.

I only added a line of code for testing.

<modal name="login">login</modal>

Guess may be because the server has disabled ssr, the browser side is not disabled, resulting in both sides of the rendering results are not the same?

This question is available on Nuxt.js community (#c791)