styled-components / styled-components-website

The styled-components website and documentation
https://styled-components.com
MIT License
611 stars 437 forks source link

Default installation as a dev dependency #932

Closed luciomartinez closed 8 months ago

luciomartinez commented 11 months ago

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.

luciomartinez commented 9 months ago

@probablyup what do you think?

quantizor commented 9 months ago

I don't think so, it should go in dependencies if it's used in production.

luciomartinez commented 8 months ago

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 🤔

quantizor commented 8 months ago

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.)