ysfdmr's avatar

Laravel 5.4 webpack.mix.js Concat all Inside the folder scripts error.

laravel 5.2 gulp & elixir

.scripts([
        'path/assets/js/app.js',
        'path/assets/js/app-routes.js',
        'path/assets/js/components/**/*.js'
    ], 'public/js/app.js');

is runing.

Laravel 5.4 webpack laravel-mix

.combine([
        'path/assets/js/app.js',
        'path/assets/js/app-routes.js',
        'path/assets/js/components/**/*.js'
    ], 'public/js/app.js');

is not working.

how to combining inside the path folder scripts ?

0 likes
2 replies
Kazuya.Gosho's avatar

I have the same problem with Laravel mix. How about this?

var glob = require ('glob')
mix.scripts(glob.sync('./resources/assets/js/**/*.js'), 'public/js/app.js')

Please or to participate in this conversation.