Snippets
Laravel Vue.JS Failed to mount component - template or render function not defined
Hello,
If you have such kind of error Laravel Vue.JS Failed to mount component: template or render function not defined, then I figure it out by adding .default
at the end of the require()
function.
The sample code will be like this-
Vue.component('example-component', require('./components/ExampleComponent').default);
Thanks