Doesn't work with Vue+Nuxt after following the instructions
Rajan opened this issue · comments
rajan commented
client.js:553 TypeError: b.component is not a function
at b (vue-disqus.js:2)
at resolveAsyncComponent (vue.runtime.esm.js:2128)
at createComponent (vue.runtime.esm.js:3645)
at _createElement (vue.runtime.esm.js:3855)
at createElement (vue.runtime.esm.js:3794)
at vm._c (vue.runtime.esm.js:4134)
at Proxy.render (_id.vue?ea9c:199)
at VueComponent.Vue._render (vue.runtime.esm.js:4191)
at VueComponent.updateComponent (vue.runtime.esm.js:2570)
at Watcher.get (vue.runtime.esm.js:2913)
Created a nuxt plugin: disqus.js
import Vue from 'vue'
import VueDisqus from 'vue-disqus'
Vue.use(VueDisqus)
Inside nuxt.config.js
plugins: [{src: '~/plugins/vue-quill-ssr-plugin', ssr: false},
{src: '~/plugins/vue-ssr-true-plugins', ssr: true},
{src: '~/plugins/disqus', ssr: false}]
Also, tested it with no-ssr module and it doesn't seem to load at the client.
<div class="comments">
<no-ssr>
<vue-disqus shortname="lesspod" :identifier="postId"></vue-disqus>
</no-ssr>
</div>
rajan commented
Fixed with following:
import VueDisqus from 'vue-disqus/dist/vue-disqus.vue';
Lucas Kennedy commented
Fixed with following:
import VueDisqus from 'vue-disqus/dist/vue-disqus.vue';
THANKS