timgavin's avatar

Combining multiple Less files

What's the proper way to combine multiple Less files into one? The following doesn't work...

mix.less([
   'resources/assets/less/theme/core.less',
   'resources/assets/less/theme/components.less',
   'resources/assets/less/theme/pages.less',
   'resources/assets/less/theme/menu.less',
   'resources/assets/less/theme/responsive.less',
   'resources/assets/less/app.less'
],'public/css/app.css');
0 likes
2 replies
Cronix's avatar
Cronix
Best Answer
Level 67

make one file that imports all of those files, and use that one file as the entry point. for instance

main.scss

@import 'variables';
@import '~bootstrap/scss/bootstrap';
@import '~sweetalert/dist/sweetalert.css';
@import 'custom';

and then you'd use main.scss as the entry point in mix.

Please or to participate in this conversation.