[Vuejs]-Laravel vue and js in blade dilemma

0๐Ÿ‘

Try this in your app.js

//...
global.$ = global.jQuery = require('jquery');
//...

You may also remove defer attr

<script src="{{ asset('js/app.js') }}"></script>

0๐Ÿ‘

Try this :

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

0๐Ÿ‘

ok it works when you put defer to the js file as well!

<script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{ asset('js/selectize_settings.js') }}" defer></script>

Leave a comment