Static GitHub Issues

[1422] How to use vanilla JS library with Nuxt?

prev: [spa] Fetch is not called when accessing child page directly
next: SSR directive

Hello. Find very hard to make some vanilla js libs work with Nuxt.

Now struggling with this https://atomiks.github.io/tippyjs/

Can somebody help me?

This is not working

if (process.browser) {
  require('tippy.js')
}

export default {
  mounted () {
    tippy('.btn')
  }
}

A couple other options doesn't work too. How to make this awesome library make work with Nuxt? It's working with non SSR Vue app like a charm.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1264">#c1264</a>)</em></sub></div>