cssnano / cssnano/cssnano

[Feature Request]: Use `svgo.config.js` for postcss-svgo

Open
#1,511 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
CSS
Stars
5k
Forks
329
Avg merge
1h 1m
Merged PRs (30d)
62

Description

### What should be improved?

SVGO supports external configuration via `svgo.config.js`: https://github.com/svg/svgo#configuration. Now, even if I have this file, `postcss-svgo` will not respect it and use the default config.

### Describe the solution you would like

I'd like the plugin to take the SVGO config into consideration, so that I don't have to list the plugins twice (in the PostCSS config and the SVGO config)

### Possible alternatives

_No response_

### Additional context

SVGO exports its own config loading function: https://github.com/svg/svgo/blob/73f7002ab614554446e26acf1552c2505448b96f/lib/svgo-node.js#L37-L67

### Are you willing to work on this?

- [x] Yes, I would like to help

Contributor guide

Open the contributing guide

Research direction

Start by locating the postcss-svgo integration and compare its current SVGO setup with the config-loading function linked in the issue. The change is complete when an existing svgo.config.js is respected without requiring the same plugin configuration to be repeated in PostCSS.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.