Closed luciomartinez closed 1 year ago
@probablyup what do you think?
I don't think so, it should go in dependencies
if it's used in production.
I don't think so, it should go in
dependencies
if it's used in production.
You're right in the sense that whatever is used in production should be part of dependencies
.
But in the case of styled-components, it's a library used at build time to generate the assets (HTML/CSS/JS) that will then go into production.
Hence, the library itself won't be used in production. Unless I'm missing something 🤔
I don't think so, it should go in
dependencies
if it's used in production.You're right in the sense that whatever is used in production should be part of
dependencies
. But in the case of styled-components, it's a library used at build time to generate the assets (HTML/CSS/JS) that will then go into production. Hence, the library itself won't be used in production. Unless I'm missing something 🤔
You are, s-c has a runtime that is included in the bundle if React rehydration takes place (99.9% of the time this is the case.)
The reason behind it is to make the default what's likely the most used way to install the library. It'll help reducing the overhead for library creators of manually doing it afterwards.