I have no answer yet. But they tried some alternatives, thought about it.
I thought we can do as below
elixir(function(mix) { mix.less('style.less', 'public/css/') .less('admin/style.less', 'public/admin/styles/'); });
But according to the documentation, we cannot make multiple calls using the sass or less method. So this is just a compilation of the last smaller file (which in this case is admin / style.css).
We can do this:
elixir(function(mix) { mix.less(['style.less', 'admin/style2.less'], 'public/css/'); });
but it compiles to the same folder.
Hoping to find out how we can do this in different folders.
I tried to copy the second file to a separate folder, but this also does not work
elixir(function(mix) { mix.less(['style.less', 'admin/style2.less'], 'public/css/') .copy('public/css/style2.css', 'public/admin/style.css'); });
This is probably because each request is asynchronous, and when the copy receives the call, then style2.css is not ready yet.
Sameer
source share