deniamnet's avatar

Laravel mix: how to exclude a SASS file from minifying for production

Hi folks,

So I am running Laravel 5.4 and using Laravel Mix to compile my assets. I have two sass files for production, however, one of the files needs to be just compiled from SASS to CSS without minifying. I don't really see how to do that. Here's what I have in my webpack.mix.js file:

    mix.js(
        [
            'resources/assets/js/app.js',
        ],
        'public/assets/js'
    )
    .sass(
        'resources/assets/sass/app.scss',
        'public/assets/css'
    )
    .sass(
        'resources/assets/sass/pdf.scss',
        'public/assets/css',
    )
    .version();

Now, the pdf.scss file is the one that needs to be "unminified" for production. Is there any way to do so?

Thanks for answers!

0 likes
2 replies
Dalma's avatar

What problem have you encountered that requires an un-minified version?

deniamnet's avatar

@DALMA - I use DOMPDF to generate PDF files, and it handles minified CSS poorly.

Please or to participate in this conversation.