This commit is contained in:
Taylor Otwell 2018-11-02 10:42:02 -05:00
parent fa2af39310
commit c2359fe119
1 changed files with 6 additions and 4 deletions

10
resources/js/app.js vendored
View File

@ -17,11 +17,13 @@ window.Vue = require('vue');
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component> * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/ */
const files = require.context('./', true, /\.vue$/i) Vue.component('example-component', require('./components/ExampleComponent.vue'));
files.keys().map(key => { // const files = require.context('./', true, /\.vue$/i)
return Vue.component(_.last(key.split('/')).split('.')[0], files(key))
}) // files.keys().map(key => {
// return Vue.component(_.last(key.split('/')).split('.')[0], files(key))
// })
/** /**
* Next, we will create a fresh Vue application instance and attach it to * Next, we will create a fresh Vue application instance and attach it to