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

Request help, how to use in nuxt #11

Open
YotrolZ opened this issue Aug 28, 2019 · 6 comments
Open

Request help, how to use in nuxt #11

YotrolZ opened this issue Aug 28, 2019 · 6 comments

Comments

@YotrolZ
Copy link

YotrolZ commented Aug 28, 2019

No description provided.

@prakashpie
Copy link

any update on this issue?

@egoist
Copy link
Owner

egoist commented Aug 29, 2019

Hmm I haven't tested it with Nuxt but it should just work, anything went wrong?

@prakashpie
Copy link

Hmm I haven't tested it with Nuxt but it should just work, anything went wrong?

HI @egoist i tried with nuxt and it is working perfectly. Thank you for making this component. I just added as plugins in nuxt with no ssr.

@YotrolZ
Copy link
Author

YotrolZ commented Sep 3, 2019

Hi, @egoist ,I used it in the nuxt project (plugin-->ssr:false) and after the refresh I got a "Mismatching childNodes vs. VNodes: NodeList [prism]" error.

@mediv0
Copy link

mediv0 commented Apr 6, 2020

Hi, @egoist ,I used it in the nuxt project (plugin-->ssr:false) and after the refresh I got a "Mismatching childNodes vs. VNodes: NodeList [prism]" error.

you can also try this in your HTML
<no-ssr><Prism>Code here</Prism></no-ssr>

or directly import module in your page like this :

import 'prismjs'
import 'prismjs/themes/prism.css'

import Prism from 'vue-prism-component'

export default {
      components: {
          Prism
     },
}

@alex-lit
Copy link

For use with SSR add to nuxt.config:

  build: {
    transpile: ['prismjs'],
  },

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

5 participants