Open clemsontiger opened 7 years ago
@clemsontiger I'm afriad I can't help you on that as I don't use requirejs.
@ratiw, hopefully someone else will give me a hand... we don't have the resources right now to switch from requirejs to webpack...
are the .vue files required for when direct including vue-table.js ? or only when using webpack?
@clemsontiger No, I don't think so. The direct include of vue-table.js
does not require the .vue
files as they are all bundled up in the vue-table.js
file already. It must be the problem the the vue-table.js
file cannot work directly under requirejs.
okay thanks. definitely disappointing as vuejs itself works just fine with requirejs, just not vuetable.
Sorry, that's the best I can do. Hoping that someone else can help with your problem. Or maybe if you have time to look into its code base and help make it work so that it could benefit those who have to same problem like you as well.
Sure, I'll try and take a look and see if I can make it work with requirejs, though not a lot of experience with that.
Apparently, I was trying to too hard and simply needed to wrap vue-table.js in a define(["vue", "vue-resource"], function(Vue, vueResource, vuetable) { ... }); block. Also had to add Vue.use(vueResource); in vue-table.js
got it fully working based on the semantic ui demo: here's my codepen of it working with requirejs: http://codepen.io/paul/full/RpMXyG/
Any chance I could get an example of the setup to use vue-table with requirejs? do I still have to use the components/*.vue files somewhere in my project when doing it this way?
see code here: http://codepen.io/paul/pen/RpMXyG
any help is appreciated.