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

requirejs #154

Open
clemsontiger opened this issue Mar 22, 2017 · 7 comments
Open

requirejs #154

clemsontiger opened this issue Mar 22, 2017 · 7 comments

Comments

@clemsontiger
Copy link

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.

@ratiw
Copy link
Owner

ratiw commented Mar 22, 2017

@clemsontiger I'm afriad I can't help you on that as I don't use requirejs.

@clemsontiger
Copy link
Author

@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?

@ratiw
Copy link
Owner

ratiw commented Mar 22, 2017

@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.

@clemsontiger
Copy link
Author

clemsontiger commented Mar 22, 2017

okay thanks. definitely disappointing as vuejs itself works just fine with requirejs, just not vuetable.

@ratiw
Copy link
Owner

ratiw commented Mar 22, 2017

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.

@clemsontiger
Copy link
Author

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.

@clemsontiger
Copy link
Author

clemsontiger commented Mar 24, 2017

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/

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