Home

Issue: 2026

Velocity.js doesn't work as ssr: false plugin, how to use it?

[issue link]

I have a plugin

import Velocity from 'velocity-animate'

export {
  Velocity
}

Using it with ssr: false

Then import it in component as import Velocity from '~/plugins/velocity'

I got an error in console

[vue-router] Failed to resolve async component default: ReferenceError: window is not defined
[vue-router] uncaught error during route navigation:
ReferenceError: window is not defined

And in browser

Cannot read property 'options' of undefined
This question is available on Nuxt.js community (#c1800)