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

Doesn't work without npm #13

Open
IvRRimum opened this issue Mar 16, 2017 · 5 comments
Open

Doesn't work without npm #13

IvRRimum opened this issue Mar 16, 2017 · 5 comments

Comments

@IvRRimum
Copy link

Hey,

When i copy paste the build/vue-cookie.js to my own project and include below the vue.js include and try to call this.$cookie or Vue.cookie i get: Undefined get for undefined.

Does this work without npm?

@iReadX
Copy link

iReadX commented Mar 27, 2017

I also have this problem....

@IvRRimum
Copy link
Author

What i did is just use tiny-cookie plugin directly. Without this wrapper. Works as a charm!

@khalwat
Copy link

khalwat commented Mar 29, 2017

yep, it's broken, I think in the build (the code in there in the source to do the right thing, and properly export)

@kartsims
Copy link

kartsims commented Apr 19, 2017

Try adding this code before your Vue code and after including tiny-cookie and Vue core's JS :

Vue.cookie = Cookie;
Vue.prototype.$cookie = Cookie;

@iReadX
Copy link

iReadX commented Jun 14, 2018

import Vue from 'vue';
import VueCookie from 'vue-cookie';

Vue.use(VueCookie);

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

4 participants