Add jQuery on laravel 5.4 mix

前端 未结 3 832
情书的邮戳
情书的邮戳 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:33

    The solution using laravel mix is force all modules to use the same jquery version: This is my code at top of webpack.mix.js:

    mix.webpackConfig({
        resolve: {
            alias: {
                 'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery')
            }
        }
    });
    

提交回复
热议问题