Laravel-mix: Combine sass (or less)?

Created on 26 Jan 2017  路  3Comments  路  Source: JeffreyWay/laravel-mix

Hello,

The docs speaks of the mix.combine() method, that allows to combine files. But it would seems that it only combine files that are already compiled (I might be wrong, if I am, sorry!).

With Elixir, I could combine multiple sass and less files in one big compiled css file like so:

mix.sass([
        'app.scss',
        'controllers.scss'
    ], 'public/assets/css');

Trying the same with laravel-mix results in an error Path must be a string, so that's clearely not working. Is it impossible at the moment to do so? Or did I miss something entirely?

Most helpful comment

You should have your main entrypoint Sass file import any other files that it needs to be combined with.

All 3 comments

You should have your main entrypoint Sass file import any other files that it needs to be combined with.

It... Totally makes sense. Thank you for that, I don't really know why I stuck with what I did before actually ! :D

me too i wasn't smart..
thanks @JeffreyWay you're my Hero

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rlewkowicz picture rlewkowicz  路  3Comments

tillkruss picture tillkruss  路  3Comments

mementoneli picture mementoneli  路  3Comments

mstralka picture mstralka  路  3Comments

kpilard picture kpilard  路  3Comments