Must I repeat the "options" for each mix.sass() call? Say I have two CSS files that I want to compile, and I want to set the same options. I can do it like this, of course:
mix.sass( 'resources/css/app.css', 'public/css' ).options({
processCssUrls: false
})
.sass( 'resources/css/admin.css', 'public/css' ).options({
processCssUrls: false
});
...but I'd rather not duplicate the options setting, especially when I'm setting many options or compiling more files.
Is there a way to apply one declaration of options to multiple files?
I suppose I could do this:
const cssOptions = {
processCssUrls: false
};
mix.sass( 'resources/css/app.css', 'public/css' ).options(cssOptions)
.sass( 'resources/css/admin.css', 'public/css' ).options(cssOptions);
That's not too bad. Any advance on that?
Alright, so according to the API, you can set a option on laravel mix to turn this off. You can see this in node_modules/laravel-mix/setup/webpack.mix.js
mix.options({
processCssUrls: false
});
Please sign in or create an account to participate in this conversation.