Open hannasorokina opened 1 year ago
@hannasorokina You have to install those plugins as dev dependency, even though it says in the readme that gulp-imagemin comes bundled with those plugins
had the same issue, my solution is: https://github.com/imagemin/imagemin/issues/411
had the same issue, my solution is: imagemin/imagemin#411
@Stephan-Pe Your issue is different - you have to update the configuration of SVGO options. See also: https://github.com/sindresorhus/gulp-imagemin/pull/359
The problem reported by OP (@hannasorokina) can be solved by explicitly importing the plugins:
import imagemin from 'gulp-imagemin';
import { gifsicle, mozjpeg, optipng } from 'gulp-imagemin';
It doesn't seem necessary to install those plugins as dev dependency as @tomasvn suggested (at least I didn't have to do it in my project).
I use gulp-imagemin im my gulp as ESM. When I run my gulp task with gulp-imagemin plugin, I've got the issue:
Windiws 10 x64 Gulp version: "gulp": "^4.0.2"; Plugin version: "gulp-imagemin": "^8.0.0". Node version: v18.12.0.
Does anybody has some solution for the issue?