M
M
Maxim2022-04-06 16:36:36
gulp.js
Maxim, 2022-04-06 16:36:36

Working with gulp-imagemin, is it possible to combine ES modules & commonJS in a build?

Hello.
I decided to add gulp-imagemin to my assembly.
But I ran into such a problem: the version of this package changed to 8.0.0 not so long ago and its connection became possible only with the help of ES modules.
I get the following:
1) When connecting via import, it gives an error, it says modules are needed.
2) I add "type": "module" to package.json swears at commonJS (the assembly is on commonJS) Tell me
, is it possible to combine modules and commonJS in one gulp assembly? If so, how? Maybe there is an example...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Viktorovich, 2022-04-08
@web_tourist

Install version 7.1.0
npm install [email protected] --save-dev

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question