Laravel give you app.js for Vue.js out of the box. So when I try to create component everything is ok.
//app.js file
require('./bootstrap');
window.Vue = require('vue');
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: '#app',
});
But how to add Vuex??? I have tried import modules inside app.js and bootstrap.js and every time got error - like Vue not defined or Vuex not defined. How to do it right? I use all out of box, Webpack for compiling app.js i public folder.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ARUYNH
via IFTTT
Aucun commentaire:
Enregistrer un commentaire