Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt support #46

Open
tksumanth1994 opened this issue Dec 26, 2018 · 2 comments
Open

Nuxt support #46

tksumanth1994 opened this issue Dec 26, 2018 · 2 comments

Comments

@tksumanth1994
Copy link

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!

@BrunoWilkinson
Copy link

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

@giovannimanzoni
Copy link

And what about enable ssr ? is it wrong or a good thing ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants