Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How combine two SASS files in one CSS file via laravel mix?

How to correct combine multiple scss files in one css file?

My current configuration webpack.mix.js

mix.sass(
[
    'resources/assets/sass/one.scss',
    'resources/assets/sass/two.scss',
], 'public/css/style.css');

But it does not work.

I try first first mix.combined scss files, then mix.sass ...

But after 'npm run watch' i got looped crazy CLI.

like image 768
Ilya Vo Avatar asked Dec 07 '22 15:12

Ilya Vo


1 Answers

Instead of combining them through mix, import the stylesheets you need together in SCSS: https://sass-lang.com/guide#topic-5

If you want to keep them separate, make a new stylesheet that just imports the needed styles.

like image 55
webdevdani Avatar answered Dec 10 '22 12:12

webdevdani