Closed mjbp closed 1 month ago
To prevent viewBox removal:
new ImageMinimizerPlugin({ minimizer: { implementation: ImageMinimizerPlugin.svgoMinify, options: { encodeOptions: { // Pass over SVGs multiple times to ensure all optimizations are applied. False by default multipass: true, plugins: [{ // set of built-in plugins enabled by default // see: https://github.com/svg/svgo#default-preset name: 'preset-default', params: { overrides: { removeViewBox: false, } } }], }, }, }, })
To prevent viewBox removal: