Move postcss to peerDependencies
ilfa opened this issue · 4 comments
It will be great not to download extra version of postcss
.
More details you can find in this article https://nodejs.org/en/blog/npm/peer-dependencies/.
I can create a PR if you are ok.
@ilfa Is this the proper way to handle this nowadays? Any docs for PostCSS specifically?
Looking through a bunch of popular PostCSS plugins, they aren't doing this:
- https://github.com/pascalduez/postcss-apply/blob/70d8c6284e1c96659283f38ebd236002de144f1c/package.json#L44
- https://github.com/stylelint/stylelint/blob/97eb96d71e5c46596cd3c840aced377fc6888e1a/package.json#L139
- https://github.com/ismamz/postcss-utilities/blob/4be3c7dee84fd4634c4e8a12e13737ea451cd472/package.json#L26
I do see that Autoprefixer does this:
@MadLittleMods since the move to postcss 8, in the Plugin BoilerPlate Repo they are showing postcss as a peerDependency.
edit: I found the migration guide, and it is now an official recommendation:
Thanks for the context @ScottAwesome!
@ilfa Feel free to create a PR
Fixed in #129 and shipped in postcss-css-variables@0.18.0
Thanks to @delucis for the contribution