aarondfrancis / vue-model

Model component for Vue.js
MIT License
857 stars 42 forks source link

Vue not defined and $ not defined #4

Closed jjcodes78 closed 6 years ago

jjcodes78 commented 8 years ago

Hi again!

I use webpack vue-cli in my Vue's projects, and in this case this 2 warnings appears.

My "temp non clean" solution: after import Vue from 'vue', I put window.Vue = Vue... and the same occurs with $ (from jQuery)... I think that be possible to update registering vue-model as plugin, and the ajax calls sending by vue-resource (for best compatibility) with lib :)

Sorry for my bad english! Thats it! Cya

aarondfrancis commented 8 years ago

@jjsquad I would like to transition from jQuery to vue-resource at some point. I'm not sure at the moment how to solve for the Vue not defined issue. Thoughts?

aarondfrancis commented 8 years ago

@jjsquad check out #5 and see if that gets rid of the need for Vue being a global variable. If it does, I'll merge and close this issue and open a new one for transitioning away from $ to vue-resource.

jjcodes78 commented 8 years ago

I'll try it and report.

Thanks

jjcodes78 commented 8 years ago

@aarondfrancis Worked like a charm! :) Thank you! Next step... vue-resource I guess. Cya!