Review Dependencies (particularly autoprefixer) #5649
Replies: 2 comments 2 replies
-
I don't think that autoprefixer is a hard dependency for tailwind. You can simply not install it and not add it to your postcss config if you don't want it. Correct me if I'm wrong. |
Beta Was this translation helpful? Give feedback.
-
I installed the listed
It also looks like the number of packages just from installing tailwind is 140 when there are no previous packages installed that might be shared. $ npm i tailwindcss
added 140 packages, and audited 141 packages in 7s Not sure if this matters or perhaps just good to be aware of your footprint. One of those things that can be surprising when you install 1 package you've suddenly installed 140. I know that's the nature of micro-dependencies, but sometimes we get critical vulnerabilities of dependencies of dependencies of dependencies nested 5 or 6 deep and don't know who in that tree of dependencies should provide a solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I just started a new project trying to keep my dependencies low to reduce future vulnerabilities. I only have 5 packages but it installs 170 packages. I realize this is the world of micro-dependencies but it looks like 72 packages get installed just by adding tailwind.
I noticed
autoprefixer
was getting installed even though I wasn't requesting it. Then I noticed it was mentioned in Tailwind'speerDependencies
. I didn't think peers were supposed to be automatically included but apparently it does as of npm v7, which I'm not sure what the difference is betweendependencies
andpeers
at this point but didn't look into it too much.Could
autoprefixer
be unlisted and handled likecssnano
here? I know this can be a tricky subject given the nature of CSS progression, but sometimes we may want to build with what's currently supported. It looks like there was a recent PR for autoprefixer, so perhaps this is already fresh in your mind. I'd be curious where you land on this either way.I'm also a little curious if there are other
dependencies
that could be moved todevDependencies
as there's a significant number there, but I obviously don't know the intricacies of tailwind.Beta Was this translation helpful? Give feedback.
All reactions