tcoopman / image-webpack-loader

Image loader module for webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to disable WebP ? Seems a bug from v7.0.0

VincentClair opened this issue · comments

I've got the following error when building package on serverless :

ERROR in ./app/assets/images/favicon.png
Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: spawn /builds/webapp/node_modules/cwebp-bin/vendor/cwebp ENOENT

It seems that, what any option i set or not set to webp config, webp is activated:

Maybe it comes from options init at

webp: config.webp || {}

Then when initializing plugins, the condition is true, at

if(options.webp)
:

Any idea to resolve it ?

Seems related to 909bcf6

Have you tried setting config.webp to false?

Yes, and with line 42, it initiliaze webp option to {}

Ah yes, I see. That's an issue indeed

removing webp from the config or setting webp.enabled = false should work again.