Skip to content

Commit 679f1b4

Browse files
committedJan 25, 2019
Added .default to Vue component requires
JeffreyWay mentioned this in the "Breaking" section here: https://github.com/JeffreyWay/laravel-mix/releases/tag/v4.0.0 with a matching commit here: laravel/laravel@dc58f95 to finally a PR here: laravel/laravel@dc58f95#diff-b7c96b83e41797041ea5067055f8b2af Without this change upon a new clone you would get a `[Vue warn]: Failed to mount component: template or render function not defined.` error in the console.
1 parent b37d3aa commit 679f1b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎resources/js/frontend/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ window.Vue = Vue;
2020
*/
2121

2222
// const files = require.context('./', true, /\.vue$/i)
23-
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key)))
23+
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
2424

25-
Vue.component('example-component', require('./components/ExampleComponent.vue'));
25+
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
2626

2727
/**
2828
* Next, we will create a fresh Vue application instance and attach it to

0 commit comments

Comments
 (0)
Failed to load comments.