phorton's avatar

Any way to have different processCssUrls rules in mix for different source files ?

Hi, I'm new to mix and webpack and I'm a little confused on some behaviours.

I have different sass files to build in mix. One is a big file for which I really want to disable the url processing (processCssUrls: false) as it takes a long time and results in a bigger file. However, I don't want to disable the option for all files, as I have one that needs url processing in order to create svg sprites.

Is there any way to enable/disable this option in a file-specific way ?

The following doesn't work, as the last option applies to all files. I know this is expected behaviour, but is there any way around ?

mix.sass('resources/assets/sass/big-file.scss', 'public/css/big-file.css')
    .options({
        processCssUrls: false
    });
    
mix.sass('resources/assets/sass/app.scss', 'public/css/app.css')
    .options({
        processCssUrls: true
    });

I use laravel-mix v0.11.4.

Thanks for your help !

0 likes
0 replies

Please or to participate in this conversation.