<!-- Love SVGR? Please consider supporting our collective: ๐ https://opencollective.com/svgr/donate --> ## ๐ Bug Report I'm trying to override default preset to disable `removeViewBox` but I get `Error: Invalid plugin "[object Object]"`. Looking at the [code](https://github.com/gregberge/svgr/blob/449f28123115501443e810a850dbc0f810eee533/packages/core/src/plugins.ts#L27-L37), it seems like the plugin is expected be a function, but I don't see an example of that anywhere. ## To Reproduce Steps to reproduce the behavior: svgo.config.cjs: ``` module.exports = { typescript: true, prettierConfig: { parser: "typescript", }, plugins: [ { name: "preset-default", params: { overrides: { removeViewBox: false, }, }, }, ], }; ``` Run: ``` npx @svgr/cli --config-file svgo.config.cjs --template template.cjs -- icon/loading.svg ``` Result: ``` Error: Invalid plugin "[object Object]" at resolvePlugin (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/core/dist/index.js:146:9) at Array.map (<anonymous>) at run (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/core/dist/index.js:171:45) at transform.sync (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/core/dist/index.js:184:10) at convert (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/cli/dist/index.js:70:25) at convertFile (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/cli/dist/index.js:79:10) at async fileCommand (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/cli/dist/index.js:135:18) at async run (/Users/robinclowers/.npm/_npx/0b534691f7d2b666/node_modules/@svgr/cli/dist/index.js:431:3) ``` ## Expected behavior The plugin should load successfully, and the viewBox attribute should be preserved. ## Link to repl or repo (highly encouraged) I'm happy to create a repro if it helps, but I suspect the issue will be obvious to someone who works on this code. ## Run `npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard` Paste the results here: ```bash ## System: - OS: macOS 14.6.1 - CPU: (10) arm64 Apple M1 Max - Memory: 4.20 GB / 64.00 GB - Shell: 5.2.15 - /opt/homebrew/bin/bash ## Binaries: - Node: 20.12.2 - ~/.volta/tools/image/node/20.12.2/bin/node - Yarn: 4.3.1 - ~/.volta/tools/image/yarn/4.3.1/bin/yarn - npm: 10.5.0 - ~/.volta/tools/image/node/20.12.2/bin/npm ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by RobinClowers and has received 1 comments.