You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to use v6 of imagemin-webp as using v7 or v8 would lead to the following error at build time:
/.../src/index.js:12
const imagemin_webp_1 = __importDefault(require("imagemin-webp"));
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /.../node_modules/imagemin-webp/index.js from /.../src/index.js not supported.
Instead change the require of /.../node_modules/imagemin-webp/index.js in /.../src/index.js to a dynamic import() which is available in all CommonJS modules.
Note that I am using node v16.20.1 and npm v8.19.4
The text was updated successfully, but these errors were encountered:
I know this is an old thread, but I recently ran across this. I had to move the import into my function and import it dynamically instead of requiring it.
I had to use
v6
ofimagemin-webp
as usingv7
orv8
would lead to the following error at build time:Note that I am using node
v16.20.1
and npmv8.19.4
The text was updated successfully, but these errors were encountered: