Open simplicitysavored opened 8 years ago
@JavaCodeFish Looks more like the problem with your configuration, not vuetable
itself. Unfortunately, I'm not an expert on this as well. I basically use vue-cli
and everything just work for me.
@ratiw I guess the configuration of the problem, but do not know where the problem,Also I have to look for information
@ratiw
I used npm install vuetable -D
,
and my entry main.js
:
import Vuetable from 'vuetable/src/components/Vuetable.vue'; import VuetablePagination from 'vuetable/src/components/VuetablePagination.vue'; import VuetablePaginationDropdown from 'vuetable/src/components/VuetablePaginationDropdown.vue';
Vue.component('vuetable', Vuetable); Vue.component('vuetable-pagination', VuetablePagination); Vue.component('vuetable-pagination-dropdown', VuetablePaginationDropdown);
new Vue({ el: '#app', data: { columns: [ 'firstname', 'lastname', 'nickname', 'birthdate', 'group.name_en', 'gender', 'last_login', '__actions' ] } })
and in index.html
:
< div id="app" > < vuetable api-url="/api/users" :fields="columns" >< /vuetable > < /div > < script src="bundle.js" >
Those code wrong?
@JavaCodeFish Looks good to me. What's the error message or the problem you've having?
@ratiw I got the browser error as follows:
bundle.js:125 Uncaught SyntaxError: Unexpected token export
and In line 125 as follows:
@JavaCodeFish I definitely think it's the problem with your webpack configuration, but I really don't know how to help on that. Why don't you try using vue-cli
to create your test probject and then move the code over.
@JavaCodeFish You can also try this example
. It's been outdated but I think it's still work. Also, check if your NPM is up to date? Some people has reported the problem's gone once they've updated it.
@ratiw Thank you for your help, I'll try it.
@ratiw
I tried vue-cli the next, excuted vue init webapck-simple#1.0 vue-cli-demo
, and vuetable work well, Although some minor problems during the period.
It seems that the official template configuration better, and I configure the document is a problem, although still do not know where the specific wrong. But the problem is solved.
Especially thank you for your suggestions
I got error as follows After excute
webapck
:I do install
babel-preset-es2015
.my
package.json
:and my
webpack.config.js
:I have no idea. anyidea Thanks!