livijn
750
3
Mix

Laravel Mix not properly loading jQuery?

Posted 2 years ago by livijn

Hi, I am trying to load my front end dependencies into my HTML site. For some reason, jQuery is never loaded. My vendor.js looks like this when compiled: http://pastebin.com/jysGvG4w and I am using <script src="{{ mix('/js/vendor.js') }}"></script> in the HTML-page.

The jQuery code is actually there (in the compiled vendor.js) - why is it not loading/working?

webpack.mix.js:

mix
    .js([
        'resources/assets/js/vendor.js'
    ], 'public/js/vendor.js')
    .js([
        'resources/assets/js/app.js'
    ], 'public/js/app.js')
    .sass('resources/assets/sass/app.scss', 'public/css/app.css')
    .version();

vendor.js:

require('jquery');
require('bootstrap-sass');
require('slick-carousel');
require('slidebars');

Please sign in or create an account to participate in this conversation.