emoji-mart-vue
emoji-mart-vue copied to clipboard
Nuxt support
Right now, I'm getting "document" not defined error when adding it as a plugin for server-side rendering.
Can you add nuxt support to this library or a workaround on how to use it for nuxt. That would be awesome.
Related to #21
Thanks!
I found the solution with this article:
https://medium.com/@codebeast_/why-your-third-party-plugin-dont-work-in-nuxt-and-how-to-fix-it-d1a8caadf422
Here's how my plugin looks, you need to include both.
import { NimblePicker, Picker } from 'emoji-mart-vue'
import Vue from 'vue'
const EmojiPicker = {
install(Vue, options) {
Vue.component('picker', Picker)
Vue.component('nimble-picker', NimblePicker)
}
}
Vue.use(EmojiPicker)
export default EmojiPicker
And what about enable ssr ? is it wrong or a good thing ?