v3.0.0
3.0.0 (2021-12-05)
There are a lot of breaking changes, the plugin has been completely rewritten, see the documentation for information and examples.
⚠ BREAKING CHANGES
- minimum supported Node.js version is
12.13.0,imageminuses dynamicimport()to load plugins, so your Node.js version should support it - by default, we don't install
imagemin, so you need to runnpm i -D imageminto installimagemin - union
minifyandminizerOptionsin one option -minimizer, you can useminimizer.implementationandminimizer.optionsto specify minimizer and options - image generation was rewritten, please use the
generatoroption to configure image generation and usenew URL("./image.png?as=webp")/div { backgaround: url("./image.png?as=webp"); }/etc in code to enable it (importandrequireare supported too) filterandfilenameoption was moved in theminimizer/generatoroptionimageminNormalizeConfigis now async function- default value of the
severityErroroption is"error", removed values:true,falseandauto - don't add
.(dot) before[ext]in thefilenameoption
Features
- added
squooshsupport - added the
minimizeroption for image optimization - added the
generatoroption for image generation - added ability to use multiple
minimizeroption feature - allow the
filenameoption will beFunction - improve error reporting
- improve types
- output helpful descriptions and links on errors
- improve stats output
Bug Fixes
- support esm
imageminplugin - supports absolute URLs, i.e.
data:/http:/https:/file: - double minification and memory leak
- respect original errors
- compatibility with asset modules