postcss / postcss-load-config

Autoload Config for PostCSS
MIT License
638 stars 71 forks source link

perf!: make yaml dependency optional #261

Closed ArnaudBarre closed 2 months ago

ArnaudBarre commented 2 months ago

Notable Changes

The direct yaml dependency is currently adding ~250kb to Vite bundle size for something that seems to be a very small usecase. I think it's better to make it a peer dependency and release a major

Commit Message Summary (CHANGELOG)

Make `yaml` a peer dependency. If you are using a yaml configuration file, migrate to JSON or install `yaml` to your project

Type

SemVer

Checklist

ai commented 2 months ago

Yes, I like the idea of reducing node_modules and I think it is a good way to do it.

But since it is breaking change, I need to think a little.

ArnaudBarre commented 2 months ago

Thanks for considering it! There is also a slight runtime perf benefit because node doesn't need to process the full yaml source code if you don't use it.

ai commented 2 months ago

Seems like there is only ≈100 .postcssrc.yml files around all public GitHub repos https://github.com/search?q=path%3A**%2F.postcssrc.yml&type=code&ref=advsearch

Not really popular config.

ai commented 2 months ago

Released in 6.0.