vue2-notify icon indicating copy to clipboard operation
vue2-notify copied to clipboard

Does not work in Nuxt.js (Vue SSR)

Open IlyaSemenov opened this issue 8 years ago • 2 comments
trafficstars

The library won't work in Nuxt.js. Simply importing vue2-notify crashes with "window not defined" (coming from hard-wired velocity-animate dependency).

Steps to reproduce:

$ node                                                                                                                                 
> require('vue2-notify')
ReferenceError: window is not defined
    at Object.<anonymous> (/Users/semenov/tmp/vue/node_modules/velocity-animate/velocity.js:417:4)
    at Module._compile (module.js:573:30)

IlyaSemenov avatar Nov 05 '17 15:11 IlyaSemenov

@websmurf If I try to replace velocity-animate with CSS animation and setTimeout function, what do you think about that? I'm also not thrilled about hard-wired velocity-animate dependency.

For fadeIn & fadeOut I can use this code https://vuejs.org/v2/guide/transitions.html#Transitioning-Single-Elements-Components

core01 avatar Nov 13 '17 20:11 core01

@core01 sorry for taking this long to respond, but yes, that would be welcome

websmurf avatar Mar 01 '18 13:03 websmurf