Kevin Powell - CommunityKP-C
Kevin Powell - Communityโ€ข15mo agoโ€ข
15 replies
vince

How to use Webpack as a way to compile Sass -> Css?

This is probably a stupid question, but I have been trying this for the past 2 hours and can't figure it out. I just need a way to compile my regular .scss files (in every directory) into 1 .css file. I'm aware I can just use sass --watch, but I'd like to have some other features webpack leverages (like minifying, and again I know sass ootb can do this).

We use Laravel Mix, which is just a library on top of Webpack that can do this using mix.sass('entry.scss', 'output.scss'), but I can't get it to work on default Webpack. The reason why I want to go from Mix -> Webpack is because I need to watch all files in my project and output it as 1 css file and Mix can't do this
Was this page helpful?