[Vuejs]-Vue.js in Laravel

0👍

you should write .default at end of require vue components because of part of the vue-loader 15 updates, if your code uses the CommonJS syntax for importing EcmaScript modules, you’ll need to append .default:
https://laravel-mix.com/docs/4.0/upgrade#importing-es-modules
but as @Ifaruki said you can import it too here’s the code:

// first
Vue.component('favourup', require('./components/Favourup.vue').default);

// second
import Favourup from './components/Favourup.vue';

Vue.component('favourup', Favourup);

Leave a comment