Laravel Mix

The concrete5 Composer-based installation includes Laravel Mix, which provides a nice API for defining Webpack build steps for your Laravel application using several common CSS and JavaScript pre-processors. With Laravel Mix, you have a file named webpack.mix.js in the root of your project, which contains simple JavaScript definitions for how you’d like to compile your SASS files into your resulting CSS files.

let mix = require('laravel-mix’);  
mix.sass(‘resources/path/to/style.sass’, ‘public/application/css/style.css’);

With a configuration like this, compiling your SASS file into CSS can be done with the command

npm run prod
Was this information useful?
Thank you for your feedback.

Could this page use improvement? Edit it!

Edit Page