In Nuxt, if I try to add third party plugin for example vue-date-picker like this
<template>
<div>
<datepicker :readonly="true" format="YYYY-MM-DD"></datepicker>
</div>
</template>
<script>
let datepicker = null
// The server-side needs a full url to works
if (process.browser) {
datepicker = require('vue-date-picker').default
}
export default {
components: {datepicker}
}
</script>
DatePicker works perfectly. But the following warning occurs
[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 ,or missing How to get rid of it? You could try wrapping the component with @homerjam @Atinux @alexchopin The Wow! by the way, when use element-ui as plugin, remember setting i try in my costume component it was great there no errors but the component not working properly? why? @homerjam perfect! Thanks This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.All 8 comments
<no-ssr/>
, or moving all dom manipulations to the mounted
lifecycle hook.<no-ssr/>
works fine....Thanks<no-ssr>
component should be getting some attention in the documentation.<no-ssr>
works great! Had no idea that was a thing. Thanks!ssr: true
Related issues
VincentLoy
路
3Comments
vadimsg
路
3Comments
lazycrazy
路
3Comments
o-alexandrov
路
3Comments
surmon-china
路
3Comments
Most helpful comment
You could try wrapping the component with
<no-ssr/>
, or moving all dom manipulations to themounted
lifecycle hook.