vue-swipe
vue-swipe copied to clipboard
Not support ssr ?
I have a problem using vue-swipe in my universal project, it seems doesn't support ssr cause I met a ReferenceError: document is not defined.
This problem seems come from your wind-dom deps but I could not find the repo, can you guys fix this bug or add this feature? 😀
+1
tl;dr
remove wind-dom once deps (if u are editing the node_module for quick use, like what I did, do not forget to change 'main' in package.json)
quick fix
swipe.vue
comment line 60:
//import { once } from 'wind-dom/src/event';
replace line 156:
once(element, 'webkitTransitionEnd', transitionEndCallback);
with:
if(document.addEventListener) {
element.addEventListener('webkitTransitionEnd', transitionEndCallback, false);
}else{
element.attachEvent('onwebkitTransitionEnd', transitionEndCallback);
}
I may send the pull request once free