kavu / webp-loader

WebP image loader & converter for Webpack
MIT License
93 stars 17 forks source link

readme shouldn't recommend multiloader #19

Open JamesGelok opened 3 years ago

JamesGelok commented 3 years ago

README shouldn't recommend multiloader because multiloader is deprecated.

kavu commented 3 years ago

@JamesGelok Hi James! Thanks for pointing it out. Do you know any non-deprecated alternatives?

paulalbertdev commented 3 years ago

@kavu Yes please :)

kavu commented 3 years ago

@paulalbertdev I'd be glad, but I need advice on what should be used instead nowadays, as I am not developing in JS these days.

Tofandel commented 3 years ago

Looking for an alternative to multi-loader as well for this, they archived the project but gave no info as to why it's deprecated and what are the alternatives

Tofandel commented 3 years ago

@kavu I made an option in the plugin called emitBeforeFile in my fork, let me know if interested in a PR, maybe I can rename the option to something more evocative, but basically specifying this option will emit the file before it's converted to the name given in the option eg: { quality: 80, emitBeforeFile: 'img/[name].[hash:8].[ext]' } will result in the file being output to img/original.abcedf.png just before the webp conversion as well as img/original.abcedf.png.webp

It's a lot easier to configure than multiloader

kavu commented 3 years ago

@Tofandel Hi! Totally missed your comment :( Sorry. Yeah, I'd be glad to discuss and accept such a change option!