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

The directive causes SSR fail #43

Open
dreamerblue opened this issue Nov 13, 2020 · 1 comment
Open

The directive causes SSR fail #43

dreamerblue opened this issue Nov 13, 2020 · 1 comment

Comments

@dreamerblue
Copy link

dreamerblue commented Nov 13, 2020

Once I render page by vue-server-renderer, the page component using vue-sticky-directive will render fail with error "ReferenceError: window is not defined".

https://github.com/mehwww/vue-sticky-directive/blob/master/src/index.js#L7

@NetCZ
Copy link

NetCZ commented Nov 13, 2020

@dreamerblue workaround, if you're using bundler, I'm using is:

import Sticky from 'vue-sticky-directive/src/sticky';
Vue.directive('Sticky', Sticky);

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

2 participants