Add jQuery on laravel 5.4 mix

前端 未结 3 822
情书的邮戳
情书的邮戳 2021-02-20 05:00

I\'m already familiar with laravel 5.1 mix (elixir), and recently I decided to test laravel 5.4 mix.

I mixed my libs on vendors files.

mix
.styles([
             


        
3条回答
  •  离开以前
    2021-02-20 05:51

    Just uncomment this line in your assets/js/bootstrap.js file:

    window.$ = window.jQuery = require('jquery');
    

    And make sure to require the bootstrap file in your assets/js/app.js like this:

    require('./bootstrap');
    

提交回复
热议问题