I use the scriptsIn
function in Laravel
5.3 to combine all Javascript files in assets/js
folder. I use the AngularJS 1.x framework to write js files with this structure:
--resources\
-----assets\
--------js\
-----------app.js
-----------controllers\
-----------------....js
-----------directives\...
I combine all js file with Elixir in Laravel 5.3:
elixir(function(mix) {
mix.sass('app.scss');
mix.scriptsIn('resources/assets/js');
});
However, when I upgraded to Laravel 5.4, Elixir is not supported. Instead, Laravel Mix is used. So, scriptsIn
is not available. Is there any function with the same purpose in Laravel 5.4? How to combine all js files?