Isn’t the whole sage theme opinionated? :).
Well, how to add to the imagemin mix correctly?
I tried this modification:
mix.copyWatched('resources/assets/images/**', 'dist/images')
.copyWatched('resources/assets/fonts/**', 'dist/fonts')
.imagemin(
'img/**.*',
{
context: 'resources',
},
{
optipng: {
optimizationLevel: 5,
},
jpegtran: null,
plugins: [
require('imagemin-mozjpeg')({
quality: 100,
progressive: true,
}),
require('imagemin-svgo'),
],
}
);
However, this results in a build error:
Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
This is probably not the same as gulp pipes.