Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling SVGO via the svgo option in config file doesn't seem to work with CLI #837

Closed
mryechkin opened this issue Mar 22, 2023 · 1 comment · Fixed by #845
Closed

Disabling SVGO via the svgo option in config file doesn't seem to work with CLI #837

mryechkin opened this issue Mar 22, 2023 · 1 comment · Fixed by #845
Labels

Comments

@mryechkin
Copy link

🐛 Bug Report

Disabling SVGO by setting svgo: false in svgr.config.js doesn't seem to work when using the CLI.

In order to truly disable it, I have to run it with the --no-svgo flag:

svgr --no-svgo --out-dir src/icons -- assets/svg

To Reproduce

Specify the following in svgr.config.js:

module.exports = {
  icon: true,
  ref: true,
  titleProp: true,
  svgo: false,
};

Then run the CLI:

svgr --out-dir src/icons -- assets/svg

Expected behavior

SVGO optimizations should not be run.

System Info

## System:
 - OS: macOS 13.2.1
 - CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
 - Memory: 85.88 MB / 16.00 GB
 - Shell: 5.8.1 - /bin/zsh
## Binaries:
 - Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
 - npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
## npmPackages:
 - @svgr/cli: ^6.5.1 => 6.5.1 
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant